Find the second highest salary.
Asked in the Virtual Onsite stage. SQL question testing window functions or aggregated ranking techniques.
Write a PostgreSQL query that returns the second highest distinct salary from the employees table.
| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Primary key for each employee |
| employee_name | VARCHAR(100) | Employee name |
| salary | NUMERIC(12,2) | Employee salary |