题解 | #员工其当前的薪水比其manager当前薪水还高#

获取员工其当前的薪水比其manager当前薪水还高的相关信息

https://www.nowcoder.com/practice/f858d74a030e48da8e0f69e21be63bef

select b.emp_no
      ,b.manager_no
			 ,b.salary as emp_salary
			 ,s.salary manager_salary from salaries s right join 
(select a.emp_no,s.salary,a.manager_no
	from salaries s 
	right join 
(
select dp.emp_no,dp.dept_no,dr.emp_no manager_no from 
	dept_emp dp left join dept_manager dr
	on dp.dept_no = dr.dept_no
)a
	on a.emp_no = s.emp_no)b
	on s.emp_no = b.manager_no
where b.salary > s.salary

全部评论

相关推荐

在等offer的火锅...:我去履历这么好,都找不到工作吗?
点赞 评论 收藏
分享
投递拓竹科技等公司10个岗位
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务