Find New Users Who Watch Videos but Never Follow Anyone
Last updated: November 29, 2026
Quick Overview
Return users who signed up this month, have watched at least one video, and have not followed any account, along with how many videos each watched.
TikTok
November 29, 20260
0
0 solved
Return users who signed up this month, have watched at least one video, and have not followed any account, along with how many videos each watched.
On TikTok, new users who never follow anyone depend entirely on the For You feed, and growth teams target them with follow prompts. This question checks anti-join patterns and how NULLs behave in NOT IN versus NOT EXISTS.
What the Interviewer Expects
- Filter signups to the month
- Use NOT EXISTS or a LEFT JOIN with IS NULL for the anti-join
- Explain the NOT IN NULL trap
- Count watches per user after the filter
- Order output to be useful to the growth team
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 also exclude users who followed and then unfollowed everyone?
- How would you compare 7-day retention between followers and non-followers fairly?
- How would you write this with a LEFT JOIN instead and which is faster in your engine?
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
signups(user_id, signup_date)follows(follower_id, followee_id, followed_at): current follow edges.watches(user_id, video_id, watched_at)- "This month" = November 2026. A user who watche...
Approach
Inner join signups to watches so only watchers remain, then exclude anyone with a follow edge using NOT EXISTS. Group to count videos.
NOT IN (SELECT follower_id FROM follows) would return nothin...