A simple solution use one join
select d.Name Department, e.Name Employee, Salary\nfrom Department d join Employee e on d.Id=e.DepartmentId\nwhere (Salary,d.id) in (select max(Salary),Departme
select d.Name Department, e.Name Employee, Salary\nfrom Department d join Employee e on d.Id=e.DepartmentId\nwhere (Salary,d.id) in (select max(Salary),DepartmentId from Employee group by DepartmentId);
[]