Practice · SQL for Data Interviews

Hard problems

Each problem runs against the same e-commerce dataset, so the schema you learn in one problem carries over to the next. Write a query, run it, and grade it in your browser.

  1. Consecutive order-day streaks
  2. Cumulative revenue by month
  3. Customers who bought every category
  4. First-touch channel attribution
  5. Median order value by channel
  6. Price deviation ranking
  7. Repeat-purchase rate by country
  8. Revenue growth rate by month
  9. Second order per customer
  10. Top products per category