Problem List|12. Second Highest SalaryMedium

12. Second Highest Salary

SQL QueriesWindow Functions
Table: `Employee` ``` +-------------+------+ | Column Name | Type | +-------------+------+ | id | int | | salary | int | +-------------+------+ ``` Write an SQL query to report the second highest distinct salary from the `Employee` table. If there is no second highest salary, the query should report `null` (or `NULL` in SQL).
Example 1:
Input: Employee table contains salaries: [100, 200, 300]
Output: 200
Explanation: 300 is highest, 200 is second highest.

Constraints:

  • Return single column SecondHighestSalary.
Integrity: 100%
Loading...
Input Arguments:
nums = [100, 200, 300]
Expected Output:
200