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
Data Manipulation (SQL/Python)
Data Scientist
Meta
November 29, 2026
Data Scientist
Onsite
Data Manipulation (SQL/Python)
Medium

0

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
LAG
tiering with CASE
transition matrix
densification
cohort movement
How to Approach This
  1. Clarify the schema and expected output format before writing queries.
  2. Use CTEs (WITH clauses) to break complex queries into readable steps.
  3. Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
  4. Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
  5. 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 Problems
Sample 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
  1. Active days per user-month.
  2. Month spine from the earliest month to the latest, crossed with users, filtered to months on or after the user's creation month.
  3. Tier via CASE on `COALESCE(active_...

Submit Your Answer
Markdown supported