Paths Subjects Questions Quizzes Pricing Search
Intermediate Open Pro

Build a Weekly Retention Table

Product asks for weekly retention: for each sign-up week, what percentage of that cohort had at least one event in week 0, week 1, week 2, … after sign-up. Weeks are 7-day windows counted from each user's own signup_date (not calendar weeks).

  1. Write the query using users and events.
  2. The January-6 cohort has 250 users; 90 distinct users have an event between day 7 and day 13 after their signup. What is week-1 retention? What if 60 of those 90 users generated 2,000 events in that window — does the number change?
  3. A reviewer says "just count events per week and divide by cohort events in week 0". Why is that wrong?

Share this question

← Back to SQL for Data Analysis practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.