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
Data Manipulation (SQL/Python)
Data Scientist
PlayStation
November 29, 2026
Data Scientist
Onsite
Data Manipulation (SQL/Python)
Medium

0

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
Cohort analysis
Retention
CTEs
Date arithmetic
Conditional aggregation
How to Approach This
  1. Clarify the schema and expected output format before writing queries.
  2. Use CTEs (WITH clauses) to break complex queries into readable steps.
  3. Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
  4. Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
  5. 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 Problems
Sample 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
  1. Find each account's first play per title as cohort_date.
  2. Join back to all of their plays for that title and compute day_n = play_date - cohort_date, using DISTINCT to collapse multiple sessi...

Submit Your Answer
Markdown supported

Related Questions