Combine WHERE + ORDER BY to surface a worklist. The 'top-N candidates ordered by amount' pattern that sales-ops, retention, and CX teams pull every week.
Retention's running a high-AOV concierge program — the team wants to call every customer who placed an order over $200 in the last cycle and personally thank them. Pull every order in `ecom_orders` where `total_price > 200`. Return order_id, customer_id, order_number, total_price. Order by total_price descending so the biggest fish are at the top of the list.
| Column | Type | Key |
|---|---|---|
| order_id | INT | PK |
| customer_id | INT | FK → ecom_customers |
| order_number | TEXT | |
| financial_status | TEXT | |
| fulfillment_status | TEXT | |
| total_price | REAL | |
| subtotal | REAL | |
| tax | REAL | |
| shipping | REAL | |
| discount_total | REAL | |
| channel | TEXT | |
| created_date | TEXT | |
| processed_date | TEXT |
Each hint you reveal reduces the XP you can earn. Try the query first.
`total_price > 200` is the filter (strictly greater than — $200 exactly doesn't qualify per the brief).
`ORDER BY total_price DESC` puts the biggest orders first.
You should see 8 rows. The two largest are tied at $287 — both happen to be holiday-window home/textile bundles.