Your question is Rolling Average with Window Functions. 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.
Impact Recruitment Group wants to monitor consultant placement activity over time. Write a PostgreSQL query that calculates a three-day rolling average of completed placements for each active consultant from January 1 through January 5, 2025.
placement_status is completed.| Column | Type | Description |
|---|---|---|
| consultant_idPK | INT | Unique consultant identifier |
| consultant_name | VARCHAR(100) | Consultant's full name |
| team_name | VARCHAR(100) | Recruitment team assignment |
| employment_status | VARCHAR(20) | Consultant employment status |
| Column | Type | Description |
|---|---|---|
| placement_idPK | INT | Unique placement identifier |
| consultant_id | INT | Consultant responsible for the placement |
| placement_date | DATE | Date of the placement activity |
| placement_status | VARCHAR(20) | Placement status, such as completed or pending |