分数排名
select s1.score, count(distinct s2.score) as `rank` from Scores as s1, Scores as s2 where s1.score <= s2.score group by s1.id order by s1.score desc
mysql 8.0 下新增窗口函数 dense_rank()
select score, dense_rank() over(order by score desc) `rank` from Scores ;
标签:s1,178,rank,score,Scores,leetcode,select From: https://www.cnblogs.com/carlzhang19/p/17303782.html