Truist analysts need to monitor short-term customer transaction activity across accounts. Write a PostgreSQL query that calculates a rolling 7-day average of each customer's daily transaction total.
| Column | Type | Description |
|---|---|---|
| customer_idPK | INTEGER | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer's display name |
| segment | VARCHAR(30) | Customer segment |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INTEGER | Unique transaction identifier |
| customer_id | INTEGER | References customers.customer_id |
| transaction_date | DATE | Transaction posting date |
| amount | NUMERIC(12,2) | Transaction amount |