[LeetCode] 184. Department Highest Salary
내 쿼리 SELECT d.name AS Department ,e.name AS Employee ,e.salary AS Salary FROM employee AS e INNER JOIN department AS d ON e.departmentid = d.id WHERE (e.departmentid ,e.salary) IN (SELECT departmentid , MAX(salary) FROM employee GROUP BY departmentid ) SQL은 다중 컬럼 인덱싱이 가능하다
2022.06.07