题解 | #获取所有非manager员工当前的薪水情况#
获取所有非manager员工当前的薪水情况
https://www.nowcoder.com/practice/8fe212a6c71b42de9c15c56ce354bebe
select d.dept_no, t1.emp_no, s.salary from ( select #e.dept_no, e.emp_no from employees e where emp_no not in (select emp_no from dept_manager) #left join dept_manager d on e.emp_no=d.emp_no #where d.emp_no is null #and to_date = '9999-01-01' )t1 left join salaries s on t1.emp_no=s.emp_no left join dept_emp d on t1.emp_no=d.emp_no