Practice Interview Questions
| Question | Status |
|---|---|
In the database, user IDs, video IDs, and watch dates are recorded when new users start watching videos. The goal is to identify the top 3 videos that most users have watched as their first 3 videos. The output should include the video ID and the count of how many times it has been watched as users' first 3 videos. If there's a tie, all videos in the top 3 will be included.
user_video_watch table:
| Column Name | Description |
|---|---|
| user_id | Identifier of the user. |
| video_id | Identifier of the video watched |
| watched_at | Time when the video was watched |
| video_id |
|---|
| watch_count |
|---|
| 1242 | 9 |
| 1243 | 5 |
| 1342 | 4 |
| 2411 | 4 |
In the database, user IDs, video IDs, and watch dates are recorded when new users start watching videos. The goal is to identify the top 3 videos that most users have watched as their first 3 videos. The output should include the video ID and the count of how many times it has been watched as users' first 3 videos. If there's a tie, all videos in the top 3 will be included.
user_video_watch table:
| Column Name | Description |
|---|---|
| user_id | Identifier of the user. |
| video_id | Identifier of the video watched |
| watched_at | Time when the video was watched |
| video_id | watch_count |
|---|---|
| 1242 | 9 |
| 1243 | 5 |
| 1342 | 4 |
| 2411 | 4 |