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

0

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
cohort analysis
LTV
cumulative sums
censoring
subscriptions
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 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 Problems
Sample 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...


Submit Your Answer
Markdown supported