-- find the maximum salary in each departmentSELECT de.dept_no, de.emp_no, salary as maxSalary from dept_emp de join salaries using(emp_no) where salary = ( select max(salary) from salaries join dept_emp using(emp_no) where dept_no = de.dept_no)-- 限制subquery的检索范围:只在当前员工所在的部门里找最高薪水