Practice · SQL for Data Interviews

Medium 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. Category revenue by country
  2. Customer category coverage
  3. Customer order counts including zero
  4. Customer order span
  5. Customer revenue without fan-out
  6. Customers above average order count
  7. Customers above average spend
  8. Customers per order status
  9. Customers who bought product 17
  10. Customers with exactly one order
  11. First order per customer
  12. January buyers who skipped March
  13. Monthly activity reconciliation
  14. Monthly revenue change
  15. Monthly signups and orders
  16. Orders above average value
  17. Orders above the customer's average
  18. Orders by channel and status
  19. Orders with multiple products
  20. Pending order details
  21. Product pairs bought together
  22. Product price bands
  23. Refund share by category
  24. Revenue by month and channel
  25. Revenue per customer by country
  26. Revenue share by order status
  27. Signup cohort activity
  28. Signups by day of week
  29. Top products by units sold