Lesson 8.4 · Pro
Two-way relationships
Friendships stored once need both directions before you count, and mirror pairs need cleaning.
In this lesson
- Make both directions with UNION ALL
- Popularity: friends as a share of all users
- Remove mirror pairs with LEAST and GREATEST
Go Pro to read this lesson
Pro unlocks every lesson and practice problem in SQL, Python, pandas and NumPy, with answers and step-by-step explanations.