Retention of Friend-Invited Versus Organic Facebook Signups
Last updated: November 29, 2026
Quick Overview
Label each new Facebook account as invite-driven if it accepted a friend invite within 24 hours before signing up, otherwise organic, then compare Day-7 and Day-30 window retention by label and signup week, also reporting retention by whether the inviter was still active.
Meta
November 29, 20260
0
0 solved
Label each new Facebook account as invite-driven if it accepted a friend invite within 24 hours before signing up, otherwise organic, then compare Day-7 and Day-30 window retention by label and signup week, also reporting retention by whether the inviter was still active.
Invites and contact-based growth loops are central to how Facebook acquires users, and the growth team wants to know whether invited users retain better because they arrive with a friend already on the platform. The screen checks an attribution join with a time window, one label per user, and a second dimension from the inviter's state.
What the Interviewer Expects
- Attribute using an invite accepted before signup, inside a 24 hour window
- Deduplicate when a user accepted several invites
- Use windowed retention (days 7 to 13, days 28 to 34)
- Bring in an inviter attribute measured at signup time
- Interpret differences cautiously
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
- Why might invited users retain better even if invites have no effect?
- How would you attribute a user who was invited by three friends?
- How would you measure the effect of invites on the inviter's retention?
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_ts), invites(inviter_id, invitee_user_id, accepted_ts) and daily_active(user_id, ds). Several invites can point to the same invitee; take the latest accepted before signup....
Approach
Find the latest qualifying invite per user with ROW_NUMBER. Left join to users to label. Compute the two retention flags and the inviter-active flag with EXISTS. Aggregate by week and label....