리트코드(LeetCode) MySQL-Department Highest Salary
select d.name as Department, e.name as Employee, salary as Salary from Employee as e inner join Department as d on e.departmentID=d.id where (departmentID,salary) in (select departmentID,max(salary) from Employee group by departmentID) INNER JOIN에도 서브 쿼리를 쓸 수 있다. select d.name as Department, e.name as Employee, salary as Salary from Employee as e inner join (select departmentID,max(salary) as ma..