Shopify
Analytics Reporting Track · Hard · 35 min
Rising Basket Buyers
The retention team wants to identify buyers whose first three orders show steadily larger baskets. Return buyer_id values where the first order total is less...
Company labels are directional practice context, not official interview guidance.
Objective
Practice query basics through a Shopify-tagged business scenario.
Approach
Use this track to train on SQL that mirrors day-to-day analytics workflows and recurring reporting asks.
Company context
Company labels are directional practice context, not official interview guidance.
The retention team wants to identify buyers whose first three orders show steadily larger baskets. Return buyer_id values where the first order total is less than the second, and the second is less than the third. Sort by buyer_id.
buyer_orders
| order_id | buyer_id | order_date | order_total | 2 |
|---|---|---|---|---|
| 1 | 100 | 2024-01-02 | 20.00 | |
| 2 | 100 | 2024-01-08 | 35.00 | |
| 3 | 100 | 2024-01-15 | 50.00 | |
| 4 | 200 | 2024-01-03 | 40.00 | |
| 5 | 200 | 2024-01-10 | 38.00 | |
| 6 | 200 | 2024-01-17 | 55.00 | |
| 7 | 300 | 2024-01-04 | 15.00 | |
| 8 | 300 | 2024-01-11 | 22.00 | |
| 9 | 300 | 2024-01-18 | 28.00 | |
| 10 | 400 | 2024-01-05 | 60.00 | |
| 11 | 400 | 2024-01-12 | 65.00 |
SQL workspace
Run queries against the protected question data, then submit once the result shape looks right.
Sign in to run SQL
Create a free account or sign in before running queries against protected question data.