Median Days to Churn for Each Facebook Gaming Signup Cohort

Last updated: November 29, 2026

Quick Overview

Define churn date as the last active day for players with no activity in the past 30 days. For each signup month, compute the share of players who have churned and the median number of days from signup to churn among churned players, and explain why the median alone is misleading.

Meta
Data Manipulation (SQL/Python)
Data Scientist
Meta
November 29, 2026
Data Scientist
Technical Screen
Data Manipulation (SQL/Python)
Medium

0

0

0 solved


Define churn date as the last active day for players with no activity in the past 30 days. For each signup month, compute the share of players who have churned and the median number of days from signup to churn among churned players, and explain why the median alone is misleading.

Facebook Gaming analysts summarize player lifetimes per cohort, and the trap is that recent cohorts have had less time to churn. The screen checks churn definition from inactivity, per-cohort percentiles, and a clear explanation of censoring.

What the Interviewer Expects
  • Compute last active day per player
  • Mark churn only when 30 days of inactivity are observed
  • Compute median lifetime among churned players
  • Report churned share alongside the median
  • Explain censoring bias for young cohorts
Key Topics to Cover
churn definition
lifetime
percentiles
censoring
cohorts
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 get an unbiased median lifetime per cohort?
  • Would you restrict to a fixed horizon, for example churn within 90 days?
  • How would reactivations change the definition?
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

players(player_id, signup_date) and play_days(player_id, ds). Data ends at max(ds). Churned means last_active <= data_end - 30. Lifetime is days from signup to last active day....

Approach

Aggregate last active day per player with a LEFT JOIN (never-played players have lifetime 0 at signup). Flag churn using the data end. Per signup month, compute churned share and the median lifetime f...


Submit Your Answer
Markdown supported