Skip to content

Commit 5f4f5ce

Browse files
refactor 176
1 parent bb37ee2 commit 5f4f5ce

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

database/_176.sql

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1 @@
1-
-- Write a SQL query to get the second highest salary from the Employee table.
2-
--
3-
-- +----+--------+
4-
-- | Id | Salary |
5-
-- +----+--------+
6-
-- | 1 | 100 |
7-
-- | 2 | 200 |
8-
-- | 3 | 300 |
9-
-- +----+--------+
10-
-- 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.
11-
12-
-- # Write your MySQL query statement below
131
select max(Salary) as SecondHighestSalary from Employee where Salary < (select max(Salary) from Employee)

0 commit comments

Comments
 (0)