文章标题
2016-02-22 21:24
260 查看
员工比经理工资高
【题目】
The Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id.
+—-+——-+——–+———–+
| Id | Name | Salary | ManagerId |
+—-+——-+——–+———–+
| 1 | Joe | 70000 | 3 |
| 2 | Henry | 80000 | 4 |
| 3 | Sam | 60000 | NULL |
| 4 | Max | 90000 | NULL |
+—-+——-+——–+———–+
【题目】
The Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id.
+—-+——-+——–+———–+
| Id | Name | Salary | ManagerId |
+—-+——-+——–+———–+
| 1 | Joe | 70000 | 3 |
| 2 | Henry | 80000 | 4 |
| 3 | Sam | 60000 | NULL |
| 4 | Max | 90000 | NULL |
+—-+——-+——–+———–+
select e.Salary from Employee e,Employee m where e.Salary>m.Salary and e.ManagerId=m.Id;
相关文章推荐
- iOS 分类和继承
- php函数不能直接访问外部变量
- Linux X11 程序下都有神马
- 5个Android开发中比较常见的内存泄漏问题及解决办法
- 访问网站的流程详解
- Sketch学习
- android样式布局--->ListView(附上源代码)
- vi/vim基本使用方法
- 算法导论—最长公共子串
- 更好的逐帧动画函数 — requestAnimationFrame 简介
- Nginx负载均衡的实现和调度算法
- 多个Mapper和Reducer的Job
- 【Android】自定义View -- 条形图(柱状图)
- 多个Mapper和Reducer的Job
- Python中的random模块
- iOS:KVO/KVC 的概述与使用
- 基于在线多示例学习的稳定目标跟踪方法
- 常用shell命令
- 流对象的使用2
- 多个Mapper和Reducer的Job