185. 部门工资前三高的所有员工
目录
1. 题目
2. 解题
select d.name AS Department,a.name AS Employee,a.Salary
from
(
select *,dense_rank() over(partition by departmentid order by salary desc) as t from Employee
) as a,department as d
WHERE a.departmentid = d.id and t<=3