Senior Product Analyst

SQL Interview Sandbox

A real SQLite database, pre-loaded with a small A/B test cohort. Write a query and run it. Everything runs in your browser, nothing is saved.

Schema

users
user_idinteger
arm'control' or 'variant'
signup_datedate
reservations
reservation_idinteger
user_idinteger
created_atdate
statusconfirmed / cancelled / refunded
subscriptions
subscription_idinteger
user_idinteger
started_atdate
canceled_atdate or null
planmonthly / annual

Questions

  1. Warm-up. Per arm, number of signups and the share with at least one confirmed reservation.
  2. Weekly cohort. Weekly signup cohorts per arm, and the share of each cohort that made a first confirmed reservation within 14 days of signup.
  3. Retention curve. Per arm, users with a confirmed reservation in week N after signup, for N from 0 to 4.
  4. 30-day conversion. Per arm, the share of signups that converted to an active subscription within 30 days, handling cancellations correctly.
  5. Sample ratio. Counts per arm. Then: are the arms split 50/50, how would you test it, and what would you do if not?
Cmd / Ctrl + Enter to run
Loading SQLite…

SQLite dialect. For date math use julianday() and strftime(). The arms are 5 vs 4 on purpose.