Second Highest Salary
来源:互联网 发布:使命召唤10画面优化 编辑:程序博客网 时间:2024/05/29 03:24
Second Highest Salary
Write a SQL query to get the second highest salary from the Employee
table.
+----+--------+| Id | Salary |+----+--------+| 1 | 100 || 2 | 200 || 3 | 300 |+----+--------+
For example, given the above Employee table, the second highest salary is 200
. If there is no second highest salary, then the query should return null
.
# Write your MySQL query statement below#select e1.Salary #from Employee e1 left join Employee e2 #on e2.Salary > e1.Salary #order by e2.Salary desc limit 1; select max(Salary) from Employeewhere Salary < (select max(Salary) from Employee);
0 0
- LeetCode:Second Highest Salary
- Leetcode: Second Highest Salary
- Second Highest Salary
- Second Highest Salary
- LeetCode Second Highest Salary
- Second Highest Salary
- Second Highest Salary
- Second Highest Salary Leetcode
- Leetcode: Second Highest Salary
- Second Highest Salary
- LeetCode Second Highest Salary
- Second Highest Salary
- Second Highest Salary
- leetcode176---Second Highest Salary
- 176 - Second Highest Salary
- Second Highest Salary
- 【Leetcode】 Second Highest Salary
- leetcode-Second Highest Salary
- 收到推送后,处理页面跳转
- HQL中fetch的作用
- 视频编解码之基本原理
- [黑马程序员]10高新技术 - 反射
- SpringMVC拦截器(资源和权限管理)
- Second Highest Salary
- Gvim入门(2)——解决各种乱码问题
- 网上商城首页实现总结(一)
- YII2常用表单元素
- C++控制台一闪而过
- win7下如何装vc6
- centos 安装 jdk
- 多个Fragment切换时不重新生成实例
- python