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
November 29, 20260
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
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 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 ProblemsSample 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...