简单的窗口函数排名
select 
课程号,学号,成绩,
dense_rank()over(partition by 课程号 order by 成绩 desc) as 排名
from 成绩表