Incedo's workforce analytics team needs to identify the second-highest salary in each department. Write a PostgreSQL query using department and employee data.
NULL and departments with fewer than two distinct non-null salaries.| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Unique department identifier |
| department_name | VARCHAR(100) | Department name |
| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee name |
| department_id | INT | References departments.department_id |
| salary | NUMERIC(12,2) | Annual salary |