Count active follow connections
Company: Meta
Role: Data Engineer
Category: Data Manipulation (SQL/Python)
Difficulty: Medium
Interview Round: Onsite
##### Question
Write SQL to return the current number of active follow connections.
Events table columns: user_id, target_id, event_type ('request_follow', 'follow_success', 'follow_reject', 'unfollow'), event_time.
A connection is active only after a 'follow_success' that has not been undone by a later 'unfollow'.
Quick Answer: This question evaluates the ability to manipulate temporal event data and reconstruct current state using SQL or Python, focusing on event sequencing, aggregation, and deduplication competencies.