第二高的薪水


连续出现的数字

分数排名

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
mysql join

部门工资最高的员工


部门工资前三高的所有员工


删除重复的电子邮箱

网友评论