SQL statement1:Select rank() over(order by s_score desc) as 名次,s_class,s_id,s_score from s_score如下名次 s_class s_id s_score-------------------- ---------- ---------- -----------1 二班 S20090733 1002 一班 S20090635 993 三班 S20090919 974 一班 S20090846 965 一班 S20090825 956 二班 S20090715 947 三班 S20090836 918 二班 S20090631 86SQL statement2:Select rank() over(partition by s_class order by s_score desc) as 名次,s_class,s_id,s_score from s_score结果集如下名次 s_class s_id s_score-------------------- ---------- ---------- -----------1 三班 S20090919 972 三班 S20090836 911 二班 S20090733 1002 二班 S20090715 943 二班 S20090631 861 一班 S20090635 992 一班 S20090846 963 一班 S20090825 95