작성
·
239
3
select b.name as Department, a.Name as Employee, b.salary as Salary
from employee as a
inner join
(select b.name, a.departmentId, max(salary) as salary
from employee as a
inner join Department as b
on a.DepartmentId = b.Id
group by b.name, a.departmentId) b
on 1=1
and a.salary = b.salary
위와 같이 문제를 풀면 답은 나오는데 리드코트에서 요구하는 답은 아닌가봐요 혹시 어떤 차이가 있는지 알 수 있나요?