You're analyzing Instagram post data and want to categorize posts based on their likes as 'Low', 'Medium', or 'High' engagement.
For that, you will be using the user_posts table which has the following columns:
| Column Name | Description |
|---|---|
| post_id | Unique identifier for each Instagram post |
| likes_count | Number of likes received on the Instagram post |
| post_type | Type of the Instagram post (photo, video or story) |
Write a query to categorize each post based on likes_count: 0-500 as 'Low', 501-1500 as 'Medium', and over 1500 as 'High'. There might be instances where a post_id has the likes_count column being null - we will assume that this is Low engagement.
| total_posts |
|---|
| High | 12 |
| Low | 31 |
| Medium | 45 |
You're analyzing Instagram post data and want to categorize posts based on their likes as 'Low', 'Medium', or 'High' engagement.
For that, you will be using the user_posts table which has the following columns:
| Column Name | Description |
|---|---|
| post_id | Unique identifier for each Instagram post |
| likes_count | Number of likes received on the Instagram post |
| post_type | Type of the Instagram post (photo, video or story) |
Write a query to categorize each post based on likes_count: 0-500 as 'Low', 501-1500 as 'Medium', and over 1500 as 'High'. There might be instances where a post_id has the likes_count column being null - we will assume that this is Low engagement.
| engagement_category | total_posts |
|---|---|
| High | 12 |
| Low | 31 |
| Medium | 45 |