Leetcode - 184. Department Highest Salary
문제
정답
SELECT Department.name AS Department, Employee.name as Employee, salary as Salary
FROM Employee
JOIN Department ON Employee.departmentId = Department.id
WHERE (salary, departmentId) in (
SELECT MAX(salary), departmentId FROM Employee GROUP BY departmentId
)