Snapmint's risk team wants to monitor daily loan defaults and smooth short-term fluctuations. Write a PostgreSQL query that calculates the 30-day rolling average of daily default events for the reporting period from February 1 through February 10, 2025.
loan_defaults to loans so only defaults belonging to known loans are counted.| Column | Type | Description |
|---|---|---|
| loan_idPK | INT | Unique Snapmint loan identifier |
| customer_id | VARCHAR(20) | Snapmint customer identifier |
| product_name | VARCHAR(50) | Financing product associated with the loan |
| Column | Type | Description |
|---|---|---|
| default_event_idPK | INT | Unique default event identifier |
| loan_id | INT | Loan associated with the default event |
| default_date | DATE | Date the loan entered default |
| default_amount | NUMERIC(12,2) | Outstanding amount at default |