Meta/Twitter level task. **Condition:** Find all pairs of users with mutual subscriptions and count their common follows. **Table:** follows (follower_id, following_id, created_at) **Requirements:** 1. Find all pairs with mutual subscription (A follows B and B follows A) 2. For each pair, count common friends (whom both follow) 3. Output user1_id, user2_id, mutual_since, common_friends_count **Hint:** Self-join for mutuality + subquery for common friends.
Sign in to solve
Start Solving