Cumulative Revenue per Subscriber by Months Since First Payment
Last updated: November 29, 2026
Quick Overview
For Meta Verified subscribers grouped by the month of their first payment, compute cumulative revenue per original subscriber at months 0 through 11 after their first payment. Include months with no revenue and exclude months that have not happened yet for recent cohorts.
Meta
November 29, 20260
0
0 solved
For Meta Verified subscribers grouped by the month of their first payment, compute cumulative revenue per original subscriber at months 0 through 11 after their first payment. Include months with no revenue and exclude months that have not happened yet for recent cohorts.
A lifetime value question in the style of Meta's subscription and monetization analytics loops. The interviewer checks cohort assignment, a dense cohort-by-month grid, cumulative sums over the offset, and right censoring of young cohorts.
What the Interviewer Expects
- Assign cohorts by first payment month
- Compute month offsets with DATE_DIFF
- Build a dense grid of cohort by offset
- Censor offsets beyond the last complete month
- Divide cumulative revenue by the original cohort size
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 do refunds and chargebacks change the curve?
- How would you project month 12 for the youngest cohorts?
- Why compare per original subscriber rather than per active subscriber?
- How would you split the curve by web versus mobile purchase?
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
verified_payments(user_id, paid_at, amount_usd, platform); each row is a successful charge, net of store fees. Cohort = month of a user's first payment. Offset k = months between cohort month and pa...
Approach
First, cohort per user. Second, revenue per (cohort, offset). Third, a grid: every cohort crossed with offsets 0 to 11, keeping only offsets whose calendar month is on or before October 2026. Left joi...