Amazon
Foundations Track · Easy · 15 min
Departments Above Average Pay
Use this Amazon scorecard to work on departments above average pay. Return each department_id whose average salary exceeds the company average salary for Mar...
Company labels are directional practice context, not official interview guidance.
Objective
Practice query basics through a Amazon-tagged business scenario.
Approach
Use this track to lock in clean query structure, basic filtering logic, and confidence with grouped output.
Company context
Company labels are directional practice context, not official interview guidance.
Use this Amazon scorecard to work on departments above average pay. Return each department_id whose average salary exceeds the company average salary for March 2024. Sort by department_id.
employees
| employee_id | department_id |
|---|---|
| 1 | 10 |
| 2 | 10 |
| 3 | 20 |
| 4 | 20 |
| 5 | 30 |
salary_payments
| employee_id | payment_date | amount |
|---|---|---|
| 1 | 2024-03-31 | 120000 |
| 2 | 2024-03-31 | 110000 |
| 3 | 2024-03-31 | 80000 |
| 4 | 2024-03-31 | 85000 |
| 5 | 2024-03-31 | 95000 |
SQL workspace
Run queries against the protected question data, then submit once the result shape looks right.
Sign in to run SQL
Create a free account or sign in before running queries against protected question data.