Microsoft Store analysts need to identify the highest-value customers from the most recently completed calendar quarter. Assume the query runs on August 29, 2026, so the target period is April 1 through June 30, 2026.
Write a PostgreSQL query to join customers with their orders and return the top three customers by total order revenue.
SUM.| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer's name |
| segment | VARCHAR(30) | Customer segment |
| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique order identifier |
| customer_id | INT | Customer associated with the order |
| order_date | DATE | Date the order was placed |
| amount | NUMERIC(12,2) | Revenue amount for the order |