Engagement Tier Transitions Month over Month for Instagram Users
Last updated: November 29, 2026
Quick Overview
Classify every Instagram user each month into a tier by active days (inactive 0, light 1 to 7, core 8 to 20, power 21 plus), then build a transition matrix counting users moving from each tier last month to each tier this month.
Meta
November 29, 20260
0
0 solved
Classify every Instagram user each month into a tier by active days (inactive 0, light 1 to 7, core 8 to 20, power 21 plus), then build a transition matrix counting users moving from each tier last month to each tier this month.
Instagram growth reviews often look at movement between engagement tiers rather than a single active count. The interviewer is checking that you densify users by month so 'inactive' is a real state, then use LAG to pair consecutive months.
What the Interviewer Expects
- Counts active days per user per month
- Cross joins users with months so inactive months produce rows
- Maps active days to tiers with CASE
- Uses LAG(tier) per user to get the prior month
- Aggregates to a from-tier by to-tier matrix and sanity-checks totals
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 show the matrix as row percentages, the probability of moving from each tier?
- Which single cell would you track as a churn-risk metric, and why?
- How would you handle users whose account was created mid-month?
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
Tables: daily_active(user_id, ds) with one row per active day, and users(user_id, created_at). I start each user's months at their creation month so pre-signup months are not called 'inactive'....
Approach
- Active days per user-month.
- Month spine from the earliest month to the latest, crossed with users, filtered to months on or after the user's creation month.
- Tier via CASE on `COALESCE(active_...