1,先查找出部门ID,最高薪水
2,查找符合条件的记录
select d1.dept_no, d1.emp_no, s1.salary maxSalary from dept_emp d1 inner join salaries s1 on d1.emp_no = s1.emp_no where (d1.dept_no, s1.salary) in (
select de.dept_no, max(s.salary) from dept_emp de inner join salaries s on de.emp_no = s.emp_no group by de.dept_no) order by d1.dept_no