sql
Week-one retention by signup cohort
SQL & Data Modeling · Funnels & Sessions · medium · Original Uplift question · PostgreSQL · 20 min
Fixture
learners
user_id, signup_date
learning_events
user_id, event_date
CREATE TABLE learners (user_id INT PRIMARY KEY, signup_date DATE); CREATE TABLE learning_events (user_id INT, event_date DATE); INSERT INTO learners VALUES (1,'2025-01-06'),(2,'2025-01-07'),(3,'2025-01-13'),(4,'2025-01-14'); INSERT INTO learning_events VALUES (1,'2025-01-13'),(1,'2025-01-20'),(2,'2025-01-12'),(2,'2025-01-20'), (3,'2025-01-19'),(3,'2025-01-26'),(4,'2025-01-21');
Evaluation criteria
- Uses signup week rather than event week as the cohort
- Applies the inclusive day-7-through-day-13 window per user
- Counts retained users once despite multiple events
Detailed grading feedback appears after you submit.
Source
Original Uplift question based on a common interview pattern.
Your answer
You get one graded attempt here without an account. Create a free account for unlimited attempts, saved progress and community write-ups.
Answers stay hidden until you ask. Reveal the full model write-up when you are ready to compare.