MSCI Analytics Platform monitors transaction activity to support customer-level financial analysis. Write a PostgreSQL query that calculates a 7-day rolling average transaction amount for every transaction.
transactions to customers to include the customer name when available.customer_id.| Column | Type | Description |
|---|---|---|
| customer_idPK | INTEGER | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer's display name |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INTEGER | Unique transaction identifier |
| customer_id | INTEGER | Customer associated with the transaction |
| transaction_date | DATE | Calendar date of the transaction |
| amount | NUMERIC(12,2) | Transaction amount |