HR wants to flag departments that pay above the company norm. Using the employees table, find every department whose average salary exceeds the company-wide average — return department and avg_salary (rounded to 2 decimal places), sorted alphabetically by department.
employees
| column | type |
|---|---|
| id | INTEGER |
| name | TEXT |
| department | TEXT |
| salary | NUMERIC |
| id | name | department | salary |
|---|---|---|---|
| 1 | Alice | Engineering | 120000 |
| 2 | Bob | Engineering | 140000 |
| 3 | Carol | Marketing | 70000 |
| 4 | Dave | Marketing | 80000 |
| 5 | Eve | HR | 60000 |
| 6 | Frank | HR | 65000 |
| department | avg_salary |
|---|---|
| Engineering | 130000.00 |
Company-wide average: (120000 + 140000 + 70000 + 80000 + 60000 + 65000) / 6 = 89166.67. Engineering averages 130000, which is above that. Marketing averages 75000 and HR averages 62500 — both are below the company average.