SQLQuokka
Start practicing
QuestionsLearnSandboxFeaturesRoadmapFAQ

Next-Month Cohort Retention

Unsolved

Meta's growth team measures month-1 retention. Users are grouped into cohorts by the calendar month of their `signup_date`. A user is retained if they have at least one activity in the calendar month immediately after their signup month (for a December signup, that is January of the next year). Activity in the signup month itself, or in later months while skipping the next month, does not count, and multiple activities in the same month count only once. Return `cohort_month` (formatted `YYYY-MM`), `cohort_size`, `retained_users` and `retention_pct` (retained / cohort size * 100, rounded to 2 decimals) for every cohort. Order the results by `cohort_month` ascending.

SQL Query Editor (Ctrl+Enter to run)
0 characters · Valid
Canonical Solution Official

Official Solution is Hidden

Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.

Community Q&A & Discussion

Ask questions, share alternate queries, and explore solutions

0 comments
Asked By:
🏢 Meta🏢 Duolingo🏢 Snap

Submission History

Your recent query executions and answer checks

Execution Pipeline:
FROM app_users
Full source dataset
9 rows total
Ready. Type a query to see live execution.
Clause: Auto-Sync · AlaSQL Engine