Write SQL and Python, run instantly in your browser, and track your progress.
You are a Content Analytics Analyst at Meta. The team wants to see the newest audience signal on each post to understand engagement patterns. Your task is to provide the most recent reaction per post, including the reacting member, the type of reaction, and when it happened. Consider only reactions on posts. Sort by the smallest post identifier; break ties by the smallest reaction identifier. Exclude entities that are not posts.
| Column Name | Type |
|---|---|
| reaction_id | INTEGER |
| entity_type | TEXT |
| entity_id | INTEGER |
You are a Content Analytics Analyst at Meta. The team wants to see the newest audience signal on each post to understand engagement patterns. Your task is to provide the most recent reaction per post, including the reacting member, the type of reaction, and when it happened. Consider only reactions on posts. Sort by the smallest post identifier; break ties by the smallest reaction identifier. Exclude entities that are not posts.
| Column Name | Type |
|---|---|
| reaction_id | INTEGER |
| entity_type | TEXT |
| entity_id | INTEGER |
| user_id |
| user_id |
| INTEGER |
| INTEGER |
| reaction_type | TEXT |
| reaction_type | TEXT |
| created_at | TEXT |
| created_at | TEXT |
| reaction_id | entity_type | entity_id | user_id | reaction_type | created_at |
|---|---|---|---|---|---|
| 1 | post | 1 | 44 | support | 2025-08-29 21:55:01 |
| 2 | post | 1 |
| reaction_id | entity_type | entity_id | user_id | reaction_type | created_at |
|---|---|---|---|---|---|
| 1 | post | 1 | 44 | support | 2025-08-29 21:55:01 |
| 2 | post | 1 |
| post_id | reaction_id | reactor_user_id | reaction_type | created_at | reaction_rank |
|---|---|---|---|---|---|
| 1 | 1 | 44 | support | 2025-08-29 21:55:01 | 1 |
| 2 | 3 | 28 | like | 2025-07-25 14:54:33 | 1 |
| 3 | 4 |
| post_id | reaction_id | reactor_user_id | reaction_type | created_at | reaction_rank |
|---|---|---|---|---|---|
| 1 | 1 | 44 | support | 2025-08-29 21:55:01 | 1 |
| 2 | 3 | 28 | like | 2025-07-25 14:54:33 | 1 |
| 3 | 4 |
Showing first 5 of 182 rows. Latest reaction per post.
Showing first 5 of 182 rows. Latest reaction per post.
| 13 |
| 13 |
| love |
| love |
| 2025-06-23 13:00:52 |
| 2025-06-23 13:00:52 |
| 3 | post | 2 | 28 | like | 2025-07-25 14:54:33 |
| 3 | post | 2 | 28 | like | 2025-07-25 14:54:33 |
| 4 | post | 3 | 22 | insightful | 2025-08-26 16:15:24 |
| 4 | post | 3 | 22 | insightful | 2025-08-26 16:15:24 |
| 5 | post | 3 | 50 | like | 2025-08-11 13:16:54 |
| 5 | post | 3 | 50 | like | 2025-08-11 13:16:54 |
| 22 |
| 22 |
| insightful |
| insightful |
| 2025-08-26 16:15:24 |
| 2025-08-26 16:15:24 |
| 1 |
| 1 |
| 4 | 10 | 2 | angry | 2025-08-24 06:37:45 | 1 |
| 4 | 10 | 2 | angry | 2025-08-24 06:37:45 | 1 |
| 5 | 15 | 50 | funny | 2025-08-16 14:42:49 | 1 |
| 5 | 15 | 50 | funny | 2025-08-16 14:42:49 | 1 |