题解 |

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

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

select s1.yg as emp_no,s2.emp_no manager_no,s1.salary emp_salary,s2.salary manager_salary
from (select s.emp_no as yg,salary,de.dept_no,dm.emp_no as jl
	  from salaries s,dept_emp de,dept_manager dm
      where s.emp_no = de.emp_no and dm.dept_no = de.dept_no and de.to_date = 
      '9999-01-01') s1,salaries s2
where s2.emp_no = s1.jl and s1.salary > s2.salary and s2.to_date = '9999-01-01';

全部评论

相关推荐

点赞 评论 收藏
分享
vegetable_more_exercise:1-1.5万,没错啊,最少是1人民币,在区间内
点赞 评论 收藏
分享
评论
1
收藏
分享
牛客网
牛客企业服务