第二高的薪水
连续出现的数字
分数排名
select
Score, dense_rank() over(ORDER BY Score DESC) as `Rank`
from Scores
select a.Score as Score,
(select count(distinct b.Score) from Scores b where b.Score >= a.Score) as `Rank`
from Scores a
order by a.Score DESC
select
Score, dense_rank() over(ORDER BY Score DESC) as `Rank`
from Scores
select a.Score as Score,
(select count(distinct b.Score) from Scores b where b.Score >= a.Score) as `Rank`
from Scores a
order by a.Score DESC
本文标题:题解
本文链接:https://www.haomeiwen.com/subject/afboyktx.html
网友评论