Week-Four Retention for New Facebook Users Who Posted in Week One
Last updated: November 29, 2026
Quick Overview
Compare week-4 retention (any activity on days 21 through 27) between new Facebook users who created at least one post in their first 7 days and those who did not, broken out by signup month.
Meta
November 29, 20260
0
0 solved
Compare week-4 retention (any activity on days 21 through 27) between new Facebook users who created at least one post in their first 7 days and those who did not, broken out by signup month.
Facebook growth teams hunt for early actions that separate users who stay from users who leave, and a technical screen often asks for the query behind such a comparison. The interviewer checks two independent flags per user, both computed relative to signup, and a clean group comparison with a sentence on causality.
What the Interviewer Expects
- Compute the early-action flag strictly within days 0 to 6
- Compute the retention flag in a separate, later window
- Keep one row per user before aggregating
- Report group sizes alongside rates
- Flag the selection bias in the comparison
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 find the best early-action threshold (one post, three posts, five)?
- How could you turn this into a causal estimate?
- How would you exclude users who were already active on Instagram before signing up?
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
users(user_id, signup_date), posts(user_id, created_ts), daily_active(user_id, ds). Day 0 is the signup date. Only users whose day 27 has passed are included....
Approach
Build one row per user with posted_wk1 (any post on days 0 to 6) and retained_wk4 (any active day on days 21 to 27) using correlated EXISTS or LEFT JOIN plus MAX. Then group by signup month and th...