Grokking SQL for Tech Interviews
Ask Author
Back to course home

0% completed

Vote For New Content
5. Find Popular Posts (Easy)
On this page

Problem Statement

Table: Posts
Each row in this table represents a post made by a user in a social media platform. It contains the unique post ID, the user who posted it, and the number of likes received by that post.

+-------------+---------+
| Column Name | Type    | 
+-------------+---------+
| post_id     | int     | 
| user_id     | int     |
| post_likes  | int     |
+-------------+---------+
  • (post_id, user_id) is a unique primary key in the above table.
  • post_id is the primary key for this table.
  • `user_id

.....

.....

.....

Like the course? Get enrolled and start learning!

On this page