TripJack's People Analytics team needs a department-level salary report for workforce planning. Write a PostgreSQL query that calculates the average salary for each department, but returns only departments with more than five employees.
AVG should naturally ignore NULL salary values.| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Unique department identifier |
| department_name | VARCHAR(100) | Department name |
| office_location | VARCHAR(100) | Primary office location |
| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| first_name | VARCHAR(80) | Employee first name |
| VARCHAR(150) | Employee work email | |
| department_id | INT | Assigned department identifier |
| salary | NUMERIC(10,2) | Annual salary in Indian rupees |