#获取员工其当前的薪水比其manager当前薪水还高的
获取员工其当前的薪水比其manager当前薪水还高的相关信息
https://www.nowcoder.com/practice/f858d74a030e48da8e0f69e21be63bef
select a.emp_no, b.emp_no as manager_no, a.salary as emp_salary, b.salary as manager_salary FROM ( select de.emp_no, de.dept_no, s.salary from dept_emp de inner join salaries s on de.emp_no = s.emp_no ) a inner join ( Select dm.emp_no, dm.dept_no, s.salary from dept_manager dm inner join salaries s on dm.emp_no = s.emp_no ) b on a.dept_no = b.dept_no where a.salary > b.salary