First INNER JOIN. Practice joining a fact (orders) to a dim (marketplaces), filtering on a date column with substring or LIKE, GROUP BY, and a two-level ORDER BY (descending on the metric, ascending on the dimension as tiebreaker).
Daily standup at 11. Pull the order count by marketplace for 2025-12-12 (a peak Q4 day). Two columns: marketplace_name, order_count. Sort order_count descending, marketplace_name ascending. We compare day-of-week patterns across marketplaces — Etsy spikes on weekends, Amazon is steadier, eBay is auction-driven. Get the daily shape right and we can spot anomalies fast.
| Column | Type | Key |
|---|---|---|
| order_id | INT | PK |
| listing_id | INT | FK → dim_listings |
| marketplace_id | INT | FK → dim_marketplaces |
| order_ts | TEXT | |
| units | INT | |
| gross_amount | REAL | |
| refunded | INT |
| Column | Type | Key |
|---|---|---|
| marketplace_id | INT | PK |
| marketplace_name | TEXT | |
| marketplace_fee_pct | REAL | |
| fba_supported | INT |
Each hint you reveal reduces the XP you can earn. Try the query first.
JOIN dim_marketplaces on marketplace_id to pull marketplace_name.
Filter substr(order_ts, 1, 10) = '2025-12-12' (order_ts is TEXT formatted YYYY-MM-DD HH:MM:SS).
GROUP BY marketplace_name, COUNT(*).
Two-level ORDER BY for stable output: order_count DESC, marketplace_name ASC.