Active Users Retention by Cohort
Hard
Advanced Queries
Group users into monthly cohorts by their first login month and return, for each cohort, how many users were active in the cohort month (month0) and in the following month (month1). Order by cohort.
Table schema
Logins(user_id INT, login_date DATE)Sample data
user_id | login_date
1 | 2026-01-05
1 | 2026-02-10
2 | 2026-01-20
3 | 2026-02-01
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.