题解 | 获取所有非manager员工当前的薪水情况
俩个多表连接和一个子查询
select d.dept_no as dept_no, d.emp_no as emp_no, s.salary as salary from (select d1.dept_no as dept_no, d1.emp_no as emp_no from dept_emp d1 left join employees d2 on d1.emp_no = d2.emp_no where d1.to_date ="9999-01-01" and d1.emp_no not in (select emp_no from dept_manager)) d left join salaries s on d.emp_no= s.emp_no where to_date = "9999-01-01";