标签:esc count one art from employee rtm sele and
SELECT d.Name AS Department,e.Name AS Employee,e.Salary AS Salary
FROM Employee e,Department d
WHERE 3>(SELECT COUNT(DISTINCT e1.Salary)
FROM Employee e1
WHERE e1.Salary > e.Salary
AND e1.DepartmentId = e.DepartmentId) AND e.DepartmentId = d.Id
ORDER BY d.Name,e.Salary DESC;
185. Department Top Three Salaries
标签:esc count one art from employee rtm sele and
原文地址:https://www.cnblogs.com/yuesi/p/10159737.html