select 学号,成绩,rank()over(order by 成绩) as 成绩升序排名, rank()over(order by 成绩 desc) as 成绩降序排名 from 成绩表 order by 成绩 desc