LeetCode.178. 分數排名

思路: 即無間隔排名。對於每個數字比較分數中有多少個大於等於自己的數,即爲自身排名。 代碼: select Score, (select count(distinct Score) from Scores as s2 where s2.Score >= s1.Score) as Rank from Scores as s1 order by Score DESC;
相關文章
相關標籤/搜索