leetcode:部門工資最高的員工

https://leetcode-cn.com/problems/department-highest-salary/

#on -> where 
select d.Name Department , e.Name Employee , e.Salary 
from Employee e join Department d on d.Id = e.DepartmentId
where (e.DepartmentId , e.Salary) in 
(select DepartmentId , Max(Salary) from Employee group by DepartmentId);
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章