Your question is Claims Rolling Average by Region. 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.
New York Life wants to monitor claims-processing volume across its policy administration regions. Given policy claim transactions and regional metadata, write a PostgreSQL query that reports monthly processed claims and a rolling three-month average for each region.
status = 'PROCESSED' and a non-null processing date.The rolling window should use reported monthly rows. A month with no processed claims is not emitted by this query.
| Column | Type | Description |
|---|---|---|
| claim_idPK | INT | Unique claim transaction identifier |
| region_id | INT | Region responsible for processing the claim |
| status | VARCHAR(20) | Current claim processing status |
| processed_at | TIMESTAMP | Timestamp when claim processing completed |
| Column | Type | Description |
|---|---|---|
| region_idPK | INT | Unique regional identifier |
| region_name | VARCHAR(50) | New York Life operating region name |