Mock interview. You're interviewing for a senior analyst job on a streaming service's growth team. The interviewer says: "We pay to bring in members through ads and search, and we give a small credit for friend referrals. Which channels are worth it? Let's build up to an answer."
Use members who signed up in 2025, so everyone has had at least six months. referral_source is empty when we don't know where someone came from; call that unknown.
"First, how long do members keep watching? For each month number after signup (0 = the signup month, 1 = the next month, up to 6), show how many 2025 members watched at least once, and what percentage of all 2025 members that is."
Expected output
month_number, active_members, pct_active (rounded to 1 decimal); seven rows, 0 to 6; sorted by month_numberExample of the shape (made-up values):
| month_number | active_members | pct_active |
|---|---|---|
| 0 | 300 | 70.0 |
| 1 | 240 | 56.0 |
Hints, the later steps and the answer come with Pro.
Step 1 of 4
Write your query here. Ctrl + Enter submits.