Featurespace's ARIC Risk Hub analyzes transaction activity by user. Write a PostgreSQL query that calculates a 7-day rolling average of daily transaction counts for each active user during the reporting period from 2024-01-01 through 2024-01-10.
| Column | Type | Description |
|---|---|---|
| user_idPK | INTEGER | Unique user identifier |
| user_name | VARCHAR(100) | User display name |
| risk_segment | VARCHAR(30) | Featurespace risk classification |
| VARCHAR(150) | Contact email |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INTEGER | Unique transaction identifier |
| user_id | INTEGER | User associated with the transaction |
| transaction_timestamp | TIMESTAMP | Transaction event timestamp |
| channel | VARCHAR(30) | Transaction channel |
| amount | NUMERIC(12,2) | Transaction amount |