Your question is Rolling Three-Month Error Average. 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.
Precisely Data Integrity Suite monitoring needs a monthly view of ingestion errors for every client, including clients with no errors in a month. Write a PostgreSQL query for January through April 2025.
client_id and month_start.| Column | Type | Description |
|---|---|---|
| client_idPK | INTEGER | Unique client identifier |
| client_name | VARCHAR(100) | Client name |
| active_from | DATE | Date the client began using the platform |
| Column | Type | Description |
|---|---|---|
| error_idPK | BIGINT | Unique ingestion error identifier |
| client_id | INTEGER | Client associated with the error |
| occurred_at | TIMESTAMP | Timestamp when the error occurred |
| error_code | VARCHAR(30) | Ingestion error classification |