Snapchat uses interaction frequency to determine a user’s "Best Friends." These are the people you communicate with most frequently on the platform.
Write an SQL query to find the top 3 friends that user_id 100 has interacted with most.
| user_id(INTEGER) | friend_id(INTEGER) | interaction_type(VARCHAR) |
|---|---|---|
| 100 | 201 | Snap |
| 100 | 202 | Chat |
| 100 | 201 | Snap |
| 100 | 203 | Story |
| 100 | 202 | Snap |
| 100 | 201 | Chat |
| 100 | 204 | Snap |
| 100 | 202 | Chat |
| 100 | 205 | Snap |
| friend_id(INTEGER) | interaction_count(INTEGER) |
|---|---|
| 201 | 3 |
| 202 | 3 |
| 203 | 1 |