Write an SQL query to find the top 3 customers by total spend each month.
Use the provided customer and order data. Include only customers with orders, and treat each order amount as spend. If customers tie, lower customer_id ranks first.
month_start, customer_name, total_spend, and spend_rankmonth_start, spend_rank, and customer_id| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(120) | Customer display name |
| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique order identifier |
| customer_id | INT | Customer associated with the order |
| order_date | TIMESTAMP | Timestamp when the order was placed |
| amount | NUMERIC(12,2) | Order spend amount |