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

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

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

select
    de.emp_no as emp_no,
    dm.emp_no as manager_no,
    s1.salary as emp_salary,
    s2.salary as manager_salary
from
    dept_emp as de
    join dept_manager as dm on de.dept_no = dm.dept_no
    join salaries as s1 on de.emp_no = s1.emp_no
    join salaries as s2 on dm.emp_no = s2.emp_no
where s1.salary > s2.salary;

全部评论

相关推荐

尊尼获获:闺蜜在哪?
点赞 评论 收藏
分享
头像
11-09 17:30
门头沟学院 Java
TYUT太摆金星:我也是,好几个华为的社招找我了
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务