Turing's engineering operations team needs a department-level view of the highest employee compensation. Write a PostgreSQL query that reports the employees earning the maximum salary in each department.
A NULL salary should not be treated as a department's maximum salary. Departments with no qualifying employee should still appear with NULL employee and salary values.
| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Primary key for the department |
| department_name | VARCHAR(100) | Department name |
| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Primary key for the employee |
| employee_name | VARCHAR(100) | Employee's full name |
| department_id | INT | Referenced department, when assigned |
| salary | NUMERIC(12,2) | Annual salary |