Classic vs rolling day-7 retention: Feb–May 2025, android
Instructions
A cohort is the users who signed up (users.signup_at) in one calendar month (cohort_month is the first day of the month). Take users of the platform 'android' who signed up from February 1, 2025 to May 31, 2025 inclusive. Classic day-7 retention: the user has an event on exactly the 7th calendar day after signup (event_time::date = signup_at::date + 7, the signup day is day 0). Rolling day-7 retention: the user has at least one event on the 7th day or later (event_time::date >= signup_at::date + 7); the data has events through June 30, 2025 inclusive. For each cohort, output cohort_month, cohort_size (the number of users in the cohort, including those with no events), day_n_users and rolling_users (the number of users retained in the classic and in the rolling sense) and day_n_pct, rolling_pct (these numbers as a percentage of cohort_size, × 100, rounded to 1 decimal place). Sort by cohort_month.
Hints
Each next one is more detailed and costs more
Query
Result
Click Run to see the query result, or Check to submit your solution.
Dataset schema
Table relationships
- N:1Many-to-one
events.→user_id users.id - N:1Many-to-one
purchases.→user_id users.id
Table data
Select a table in the diagram or list to view its rows.