题目标签:
题目给了我们一个工资表,让我们返回第二高的工资。
利用Max,把第一高的工资找到,然后利用 NOT IN,去找到第二高的工资。
Java Solution:
Runtime: 153ms, faster than 44 %
完成日期:05/22/2019
关键点:MAX, NOT IN
# Write your MySQL query statement below SELECT Max(Salary) As SecondHighestSalary FROM Employee WHERE Salary NOT IN (SELECT Max(Salary) FROM Employee);
LeetCode 题目列表 - LeetCode Questions List
题目来源:https://leetcode.com/