OpenText wants a regional customer-spending view for account planning. Write a PostgreSQL query that identifies the three customers with the highest qualifying spend in each region during the year ending 2026-08-29.
CURRENT_DATE - INTERVAL '1 year' as the date boundary.| Column | Type | Description |
|---|---|---|
| region_idPK | INT | Unique region identifier |
| region_name | VARCHAR(50) | Display name of the region |
| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer display name |
| region_id | INT | Assigned region identifier |
| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique order identifier |
| customer_id | INT | Customer who placed the order |
| order_date | DATE | Date the order was placed |
| order_amount | NUMERIC(12,2) | Monetary value of the order |