Your question is Second Highest Trader Salary. Start with the requirements and the one table on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
You are given a table of employee salaries from a trading analytics environment. Write a SQL query to return the second highest distinct salary from the table. If the highest salary appears multiple times, it should still count only once. If there is no second distinct salary, the query should return no rows.
| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee full name |
| salary | INT | Employee salary amount |