Coding Test

Leetcode - 184. Department Highest Salary

Indo Yoon


Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.


SELECT AS Department, as Employee, salary as Salary
FROM Employee
JOIN Department ON Employee.departmentId =
WHERE (salary, departmentId) in (
    SELECT MAX(salary), departmentId FROM Employee GROUP BY departmentId