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

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

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

select t1.emp_no,t2.manager_no,t1.salary emp_salary,t2.salary manager_salary
from
(select de.emp_no,s.salary from dept_emp de,salaries s
where de.emp_no = s.emp_no) t1,
(select de.emp_no,dm.emp_no manager_no,s.salary from
dept_emp de,dept_manager dm,salaries s
where de.dept_no = dm.dept_no
and dm.emp_no = s.emp_no)t2
where t1.emp_no = t2.emp_no
and t1.salary > t2.salary

全部评论

相关推荐

夏日狂想曲:连体婴是这样的,不过国内还有上四休三的公司?
点赞 评论 收藏
分享
10-02 19:29
已编辑
浙江科技大学 运营
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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