日期:2014-05-18 浏览次数:20452 次
select avg(理科数学) from z_21 where examcode in (select top 60 percent examcode from z_21 where class='61' order by '总分' desc) and class='61'
select top 60 percent avg(理科数学) from z_21 where class='61' order by '总分' desc
select top 10 percent avg(理科数学) from z_21 where class='61' order by '总分' desc select top 30 percent avg(理科数学) from z_21 where class='61' order by '总分' desc select top 60 percent avg(理科数学) from z_21 where class='61' order by '总分' desc
帮水锅解释下: 逻辑查询处理的各个阶段 (5) SELECT (5-2) DISTINCT (5-3) TOP(top_specification)(5-1)(select_list) (1) FROM(1-J)<left_table><join_type> join<right _table> on <on_predicate> (1-A) < left_table><apply_type> apply<right_table_expression> AS<alias> (1-P) < left_table>PIVOT(<piovt_specification>) AS <alias> (1-U) < left_table>UNPIVOT(<unpiovt_specification>) AS <alias> (2) WHERE <where_predicate> (3)GROUP BY<group_by_specification> (4)HAVING(having_predicate> (6)ORDER BY<order_by_list>;