Loading interview...
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
- mid
Interview Prompt
Given a users table (with signup dates) and a user_sessions table, write a query to compute monthly cohort retention. Group users by signup month. For each cohort, calculate what fraction of users had at least one session in each subsequent month. Return cohort month, months since signup, and retention rate.
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