Cumulative Revenue per Install by Cohort for Facebook Instant Games
Last updated: November 29, 2026
Quick Overview
For an Instant Games title, compute for each install week the cumulative in-game purchase revenue per installer at days 1, 7, 14 and 30 after install, plus the share of installers who have paid at least once by each milestone.
Meta
November 29, 20260
0
0 solved
For an Instant Games title, compute for each install week the cumulative in-game purchase revenue per installer at days 1, 7, 14 and 30 after install, plus the share of installers who have paid at least once by each milestone.
Gaming partners on Facebook watch revenue retention curves (cumulative revenue per installer) to judge whether acquisition campaigns pay back. Meta onsite interviewers use it to test cumulative sums relative to each user's own start, a fixed denominator of installers including non-payers, and censoring of milestones that have not elapsed.
What the Interviewer Expects
- Measure days since each user's own install
- Use all installers, payers or not, as the denominator
- Compute cumulative revenue at several milestones in one pass
- Compute payer conversion alongside revenue
- Censor milestones beyond the data window
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 project day-90 revenue per installer from day-14 data?
- How would you split this by acquisition campaign?
- How do refunds affect the curve and how would you treat them?
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
installs(user_id, install_ts) one row per user and purchases(user_id, purchase_ts, amount_usd) with refunds as negative amounts. Milestone day N includes purchases with `purchase_ts < install_ts +...
Approach
Per user, compute revenue before each milestone with conditional sums, plus payer flags. Then aggregate by install week, dividing by installer count. Null out a milestone if the week's latest install ...