select d.emp_no, de.emp_no as manager_no, s.salary as emp_salary, se.salary as manager_salary from dept_emp as d, dept_manager as de, salaries as s, salaries as se WHERE s.salary>se.salary and d.emp_no=s.emp_no and d.dept_no=de.dept_no and se.emp_no=de.emp_no 搞清楚表中数据的关系即可