Your question is Average Department vs Enterprise SQL. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Tavant leadership wants a salary comparison view for workforce planning across its engineering and delivery teams. Write a PostgreSQL query that shows each department's average salary alongside the average salary across the entire enterprise.
| 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 identifier |
| salary | NUMERIC(10,2) | Annual employee salary |