Monthly Cohort Retention
A medium SQL mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L4
Interview Prompt
Build a cohort retention analysis. Users are grouped by the month they signed up. For each signup cohort, calculate what fraction of users were active in each subsequent month. A user is active in a month if they have at least one session during that month. Return the cohort month, the months since signup, and the retention rate.
Summary
Compute month over month retention rates for user signup cohorts.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your sql solution with real code execution
- Get instant feedback and a hire/no-hire decision