左连接判空
获取所有非manager员工当前的薪水情况
http://www.nowcoder.com/questionTerminal/8fe212a6c71b42de9c15c56ce354bebe
select de.dept_no,t1.emp_no,s.salary from (select e.emp_no from employees e left join dept_manager dm on e.emp_no=dm.emp_no where dm.dept_no is null) t1 join salaries s on t1.emp_no=s.emp_no join dept_emp de on t1.emp_no=de.emp_no where s.to_date='9999-01-01'
先左连接,通过判定null为非manger员工,然后多表join即可