Use SQL to find the total amount spent by each customer.
Return every customer represented in the data. Treat missing transaction amounts as contributing nothing to the customer's total.
customer_name and total_spent.total_spent descending, then customer_name ascending to break ties.| Column | Type | Description |
|---|---|---|
| order_idPK | INTEGER | Unique identifier for the order |
| customer_name | VARCHAR(100) | Name of the customer who placed the order |
| amount | DECIMAL(10,2) | Amount spent on the order |