Daily Follower Counts From Irregular Instagram Snapshots With Forward Fill

Last updated: November 29, 2026

Quick Overview

Instagram creator follower counts are captured at irregular times, several times a day for some creators and once a week for others. Build a daily end-of-day follower series per creator from the first snapshot to today, carrying forward the last known value on days without a snapshot.

Meta
Data Manipulation (SQL/Python)
Data Engineer
Meta
November 29, 2026
Data Engineer
Technical Screen
Data Manipulation (SQL/Python)
Medium

0

0

0 solved


Instagram creator follower counts are captured at irregular times, several times a day for some creators and once a week for others. Build a daily end-of-day follower series per creator from the first snapshot to today, carrying forward the last known value on days without a snapshot.

Common in Meta data engineering interviews for creator insights pipelines, where downstream charts need one value per day. The interviewer looks for last-value-per-day selection, a date spine, and a forward fill that works without IGNORE NULLS support.

What the Interviewer Expects
  • Pick the last snapshot of each day per creator
  • Build a per-creator date spine to today
  • Forward fill with a portable grouping trick or LAST_VALUE IGNORE NULLS
  • Mark which days were observed versus filled
  • Avoid filling beyond a staleness limit if required
Key Topics to Cover
forward fill
date spine
last value per group
window functions
snapshots
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 cap the forward fill at 7 days?
  • How would you compute daily net follower change from this?
  • What if a snapshot is wrong (a drop to zero then recovery)?
  • How do you make this incremental instead of a full rebuild?
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

follower_snapshots(creator_id, snapshot_ts, followers). Snapshots are UTC. End of day means the last snapshot with that UTC date. The series runs from each creator's first snapshot date to `DATE '20...

Approach

Step one: ROW_NUMBER per creator and date by snapshot_ts DESC, keep the first row. Step two: cross the creator's date range with the calendar and left join, giving NULLs on unobserved days. Step thr...


Submit Your Answer
Markdown supported