# dense_rank 排名selectDepartment,Employee,Salary
from(selectd.name as Department,e.name as Employee,e.salary as Salary,(dense_rank()over(partitionby d.name orderby e.salary desc))as rankingfrom Employee e leftjoin Department d on e.departmentId=d.id)as t
where ranking<=3;