one way to solve this question using inner join
获取所有部门中当前员工薪水最高的相关信息
http://www.nowcoder.com/questionTerminal/4a052e3e1df5435880d4353eb18a91c6
select a.dept_no, b.emp_no, max(b.salary) from dept_emp a inner join salaries b on a.emp_no=b.emp_no and a.to_date=b.to_date and a.to_date='9999-01-01' group by dept_no;
能通过

