题解 | #获取员工其当前的薪水比其manager当前薪水还高的相关信息#
获取员工其当前的薪水比其manager当前薪水还高的相关信息
http://www.nowcoder.com/practice/f858d74a030e48da8e0f69e21be63bef
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
搞清楚表中数据的关系即可