Instagram Follow-Back Rate Within Forty-Eight Hours
Last updated: November 29, 2026
Quick Overview
Using an Instagram follows table, compute for each day the share of new follows that were reciprocated (the followee followed the follower back) within 48 hours.
Meta
November 29, 20260
0
0 solved
Using an Instagram follows table, compute for each day the share of new follows that were reciprocated (the followee followed the follower back) within 48 hours.
Reciprocity is a core health signal for Instagram's social graph, and this question appears in Meta product analytics screens. The interviewer wants a correct self join with a time window, the right denominator, and awareness that unfollow and refollow creates duplicate edges.
What the Interviewer Expects
- Self joins the follows table on swapped follower and followee
- Bounds the follow-back to strictly after the original follow and within 48 hours
- Dedupes repeated follow events so each pair counts once
- Keeps unreciprocated follows in the denominator with a LEFT JOIN
- Excludes follows too recent to have a full 48 hour window
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 treat a pair where both follows happened at the same second?
- How would the metric change if you split by whether the followee is a creator account?
- How do you handle a follow-back that happens after an unfollow?
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
Table follows(follower_id, followee_id, followed_at), one row per follow event. A user can follow, unfollow and refollow, so the same pair can appear more than once. I will define the original follo...
Approach
- Dedupe to the first follow per ordered pair.
- LEFT JOIN that set to itself with the pair reversed and the time condition in the ON clause, so pairs without a follow-back survive with NULLs.
- Ag...