#56

Second-Largest Salary

An HR analyst is compiling a pay-band report and needs the second-highest salary across all employees. If there isn't one (everyone earns the same, or there's only one employee), return NULL. Treat duplicate salaries as a single value.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.

second_highest_salary
85000

Your query result will appear here