Day One and Day Seven Retention for New Title Players
Last updated: November 29, 2026
Quick Overview
From a logins table (account_id, title_id, play_date), compute for each title and first-play cohort date the cohort size and the share of players who played again exactly 1 day and exactly 7 days after their first play, only for cohorts old enough to measure.
PlayStation
November 29, 20260
0
0 solved
From a logins table (account_id, title_id, play_date), compute for each title and first-play cohort date the cohort size and the share of players who played again exactly 1 day and exactly 7 days after their first play, only for cohorts old enough to measure.
First-party studios and the PlayStation Plus catalog team watch early retention to judge launches and catalog additions. The interviewer checks correct cohort definition, deduplication of multiple plays per day, and excluding cohorts that have not had seven days to mature.
What the Interviewer Expects
- Define the cohort as the first play date per account and title
- Deduplicate multiple sessions on the same day
- Compute day offsets with date arithmetic, not string math
- Exclude immature cohorts from the D7 metric
- Explain exact-day versus rolling retention
Key Topics to Cover
How to Approach This
- Clarify the schema and expected output format before writing queries.
- Use CTEs (WITH clauses) to break complex queries into readable steps.
- Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
- Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
- For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
- How would you compute rolling D7 (played on any day 1 to 7) instead of exact-day?
- PS Plus catalog additions bring many lapsed players; how would you separate new from returning players?
- How would you make this incremental for a daily pipeline instead of a full scan?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice SQL ProblemsSample Answer
Clarify the Data
logins may hold many rows per account, title and day. play_date is a DATE in the player's local day or UTC; I will confirm which. Retention here is exact-day: D1 means a play on cohort date + 1, D...
Approach
- Find each account's first play per title as
cohort_date. - Join back to all of their plays for that title and compute
day_n = play_date - cohort_date, using DISTINCT to collapse multiple sessi...