Your question is Second Highest Value SQL. 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.
Write a query to find the second highest value in a specific column.
Use employee_compensation.annual_salary as the target column and treat duplicate salary values as one distinct value. Return NULL if fewer than two distinct non-NULL salary values exist.
second_highest_salary.annual_salary.| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee name |
| annual_salary | DECIMAL(12,2) | Annual salary amount |