当前位置:Gxlcms >
数据库问题 >
【SQL】185. Department Top Three Salaries
【SQL】185. Department Top Three Salaries
时间:2021-07-01 10:21:17
帮助过:22人阅读
# Write your MySQL query statement below
2 select d.Name
as Department,e.Name
as Employee,e.Salary
3 from Department d,Employee e
4 where d.Id
=e.DepartmentId
5 and 3>(
6 select count(
distinct Salary)
7 from Employee
8 where Salary
>e.Salary
9 and DepartmentId
= e.DepartmentId
10 );
【SQL】185. Department Top Three Salaries
标签:logs rom company from ane tab sam aries sel