select a.emp_no,b.emp_no,c.salary,d.salary
from dept_emp a 
left join dept_manager b 
on a.dept_no = b.dept_no  
left join salaries c 
on a.emp_no = c.emp_no
left join salaries d 
on b.emp_no = d.emp_no
where c.salary > d.salary

薪水表需要关联两次,一次是关联员工,一次是关联主管