Question
Table:
Followers
+-------------+------+
| Column Name | Type |
+-------------+------+
| user_id | int |
| follower_id | int |
+-------------+------+
(user_id, follower_id) is the primary key (combination of columns with unique values) for this table.
This table contains the IDs of a user and a follower in a social media app where the follower follows the user.
Ideas
- Just count the number of times an id appears in user_id since we have a M:1 relationship between user_ids and follower_id here.
- Order by ids ascending