Explain cohort retention and write a pseudo-query for May signups

Tests cohort retention vs aggregate DAU and SQL self-joins for Week 1, 2, and 4 retention from May signups. Strong answers define cohorts by signup date, use datediff, and left-join activity. Red flag: using calendar week instead of relative signup date.
What's really being asked
Whether you understand that cohort retention tracks groups of users who start together and measures their return rate over specific relative time windows, as opposed to aggregate metrics like DAU or MAU that blend user vintages and mask drop-off curves. It also tests your ability to model SQL date arithmetic, handle the denominator problem in retention calculations, and choose the right join type to include inactive users.
The full answer
First, define the cohort as all distinct users with a signup_date falling in May. Second, explain why aggregate active-user counts are misleading: if June signups surge, aggregate MAU can rise even while May users churn, making the product look healthier than it is. Third, outline a pseudo-query structure: start with a users table containing user_id and signup_date, filter to May signups, then left-join an activity table on user_id where event_date is strictly greater than signup_date. Compute relative age as datediff between event_date and signup_date. Bucket into Week 1 for ages 1 through 7 inclusive, Week 2 for ages 8 through 14 inclusive, and Week 4 for ages 22 through 28 inclusive. Fourth, emphasize that the denominator is the count of distinct users in the May cohort, and the numerator is distinct returning users in each bucket, so users with no activity still count as zero and do not disappear from the denominator.
The mistakes people make
Using calendar weeks or months instead of periods relative to each individual signup date, which destroys the cohort concept and makes comparisons unfair. Writing an inner join between users and activity, which silently drops zero-activity users and inflates retention. Defining retention as total events divided by total users rather than distinct returners divided by cohort size. Forgetting to deduplicate multiple events per user per day, which can overstate engagement. Choosing an ambiguous activity timestamp that conflates signup with first action.
What usually comes next
How would you define active: any event or a specific value moment? How do you handle timezone differences between signup and event timestamps? How would you compare the May cohort to the June cohort? How would you turn this query into a retention matrix for every weekly cohort?
A concrete example
Imagine 2,000 users signed up in May. Of those, 800 performed an action within 1 to 7 days after signup, 600 within 8 to 14 days, and 400 within 22 to 28 days. The pseudo-query would return 40 percent Week 1 retention, 30 percent Week 2 retention, and 20 percent Week 4 retention. Notice that the denominator stays fixed at 2,000 while the numerators shrink, revealing the true decay curve.
Interview question
What is the primary reason to LEFT JOIN the activity table when calculating cohort retention for May signups?
- a.It ensures users with no post-signup activity remain in the denominator, preventing inflated retention.Correct
- b.It allows the query to count signup events as part of Week 1 retention.
- c.It simplifies datediff by treating null event dates as zero-day activity.
- d.It prevents duplicate event rows from overstating the number of distinct returners.
Why? this is the answer
A LEFT JOIN keeps every May signup in the denominator even if they never return; an INNER JOIN would silently drop inactive users and make retention look higher than it actually is.
Just read this? Test yourself on what you have been reading.
Read the original → amplitude.com
- #analytics
- #sql
- #retention
- #cohort-analysis
- #metrics
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on analytics — each one lists the topics its interview covers.
See open roles