Teradata Vantage reporting needs a monthly sales trend for active sales regions. Write a PostgreSQL-compatible SQL query that calculates monthly sales and a rolling three-month average for each active region from January through April 2025.
| Column | Type | Description |
|---|---|---|
| region_idPK | INT | Unique identifier for a sales region |
| region_name | VARCHAR(100) | Display name of the sales region |
| is_active | BOOLEAN | Whether the region is included in reporting |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique transaction identifier |
| region_id | INT | Region associated with the transaction |
| sale_date | DATE | Date on which the sale occurred |
| amount | DECIMAL(12,2) | Sales amount, which may be NULL |