Weekly Retention Curves for Apple Fitness Plus Trial Cohorts

Last updated: November 29, 2026

Quick Overview

Using tables of trial start dates and completed workouts, compute for each weekly cohort of Apple Fitness+ trial starters the share of users who completed at least one workout in each of their first 8 weeks after starting.

Apple
Data Manipulation (SQL/Python)
Data Scientist
Apple
November 29, 2026
Data Scientist
Onsite
Data Manipulation (SQL/Python)
Medium

0

0

0 solved


Using tables of trial start dates and completed workouts, compute for each weekly cohort of Apple Fitness+ trial starters the share of users who completed at least one workout in each of their first 8 weeks after starting.

Fitness+ growth teams judge trial quality by whether new users build a workout habit before the trial converts to paid. The interviewer checks cohort definition, relative week computation, correct denominators, and how you avoid survivorship and missing-week mistakes.

What the Interviewer Expects
  • Defines cohorts by the week of trial start and week numbers relative to each user's own start date
  • Uses DISTINCT users per cohort and week to avoid counting multiple workouts
  • Uses the full cohort size as the denominator, including users who never worked out
  • Limits to the first 8 weeks and handles cohorts too recent to observe
  • Explains how to fill weeks with zero activity
Key Topics to Cover
cohort analysis
retention
date arithmetic
joins
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 exclude cohorts whose week 7 has not finished yet?
  • How would you compare retention of users who came from an Apple One bundle versus a device purchase offer?
  • Would you define week 0 by calendar week or by days since start, and why?
  • How would you turn this into a 'still active at week k' survival curve instead?
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

Tables: trial_starts(user_id, start_date) with one row per user, and workouts(user_id, workout_date) with many rows per user. Week number is days since the user's own start divided by 7 (days 0 to...

Approach

Build cohorts, join workouts in the 56-day window after start, compute week_number, take DISTINCT (user, week), then count per cohort and week and divide by the cohort size computed separately from ...


Submit Your Answer
Markdown supported