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

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

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

select c.emp_no,n.emp_no,c.salary 'emp_salary',n.salary 'manager_salary'
from 
(select a.emp_no,a.dept_no,salary
from dept_emp a
inner join salaries b
on a.emp_no =b.emp_no
where b.to_date = '9999-01-01') c,
(select d.emp_no,d.dept_no,salary
from dept_manager d
inner join salaries m
on d.emp_no = m.emp_no
where m.to_date = '9999-01-01') n
where c.dept_no = n.dept_no and c.salary > n.salary

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

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