FunctionRacerProblemsRace

Second From the Top

MediumSQLSQLite

Return one row with one column, second: the second highest salary in the table, counting equal salaries once. When there is no second salary (an empty table, or everyone on the same pay), second is NULL.

Example 1

employees
idnamesalary
1Ada5000
2Ben7000
3Cy7000
4Dee6000
returns
second
6000

Constraints

Race itor take your time

Write it in your browser, against the clock. The model query, with a note on each piece of it, comes after.

More SQL problems