Search ⌘K
Shopify
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...

Analytics Reporting Track
Hard
35 min
query basics
aggregation
date functions

Company labels are directional practice context, not official interview guidance.

Timer 00:00
Back to practice

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.

Prereq: query basics
Prereq: filtering
Prereq: aggregation
Prereq: date functions

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 INT
buyer_id INT
order_date DATE
order_total NUMERIC(10
2
order_idbuyer_idorder_dateorder_total2
11002024-01-0220.00
21002024-01-0835.00
31002024-01-1550.00
42002024-01-0340.00
52002024-01-1038.00
62002024-01-1755.00
73002024-01-0415.00
83002024-01-1122.00
93002024-01-1828.00
104002024-01-0560.00
114002024-01-1265.00
Editor
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.