What SQL query would you use to find the top 3 customers by total spend for each month?
Use the provided customers and orders tables. Return exactly three customers per month, breaking spend ties by the lower customer_id.
month_start, customer_id, customer_name, and total_spendmonth_start ascending, total_spend descending, then customer_id ascending| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer display name |
| 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) | Order spend amount |