Before the loyalty campaign launches, the sales team needs to know who the big spenders are. Using the orders table, find the top 3 customers by total amount spent across all their orders.
Return customer_id and total_spent, ordered by total_spent descending.
orders
| column | type |
|---|---|
| id | INTEGER |
| customer_id | INTEGER |
| amount | NUMERIC |
| id | customer_id | amount |
|---|---|---|
| 1 | 1 | 100.00 |
| 2 | 2 | 500.00 |
| 3 | 1 | 200.00 |
| 4 | 3 | 150.00 |
| 5 | 4 | 50.00 |
| 6 | 5 | 400.00 |
| customer_id | total_spent |
|---|---|
| 2 | 500.00 |
| 5 | 400.00 |
| 1 | 300.00 |