185. Department Top Three Salaries
Posted yuesi
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了185. Department Top Three Salaries相关的知识,希望对你有一定的参考价值。
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的主要内容,如果未能解决你的问题,请参考以下文章
185. Department Top Three Salaries