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

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

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

select t1.emp_no,t2.emp_no as manager_no,t1.salary as emp_salary,t2.salary as manager_salary
from (select de.emp_no,de.dept_no,s.salary from dept_emp de join salaries s on de.emp_no=s.emp_no ) t1 --员工工资
join
(select dm.emp_no,dm.dept_no,s.salary from dept_manager dm join salaries s on dm.emp_no=s.emp_no) t2
on t1.dept_no=t2.dept_no and t1.salary>t2.salary;

--查出员工薪水表
--查出经理薪水表
--做连接

全部评论

相关推荐

03-13 14:21
已编辑
江西警察学院 前端工程师
站队站对牛:红红一大片 天都要塌了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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