Write a SQL query using GROUP BY and HAVING to find departments where the average employee salary is greater than a specific threshold.
Use the departments and employees tables. For this exercise, the threshold is 75000.
department_name and average_salary, rounded to two decimal places.average_salary descending, then department_name ascending.| 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 | Employee department reference |
| salary | NUMERIC(12,2) | Annual employee salary |