rank() && dense_rank()
1.rank()
排名按照1,2,2,4,5,6
select score,rank() over(order by S.score desc) as "rank"
from Scores S
2.dense_rank()
排名按照1,2,2,3,4,5
select score,dense_rank() over(order by S.score desc) as "rank"
from Scores S
标签:dense,函数,over,Scores,rank,---,score,sql
From: https://www.cnblogs.com/Zhouya/p/17405403.html