You're working with the Data Science Team at Instagram to build an alogorithm to create a personalized experience for each user on the platform.
Include all users even those that did not post or had a session. If they don't have posts, comment, likes or video views, default their value to 0.
For that, they need the following information for each user:
Here are the tables available to you:
users table:
| Column Name | Description |
|---|---|
| user_id | Unique identifier for each user |
| signup_date | The date when the user signed up |
posts table:
| Description |
|---|
| post_id | Unique identifier for each Instagram post |
| user_id | Identifier for the user who created the post |
| posted_date | Date when the post was made |
sessions table:
| Column Name | Description |
|---|---|
| session_id | Unique identifier for each Instagram session |
| user_id | Identifier for the user involved in the session |
| session_date | Date of the session |
| nb_comments | Number of comments made during the session |
| nb_likes | Number of likes received during the session |
| nb_video_views | Number of video views during the session |
| user_id | total_posts | most_recent_post | total_comments | total_likes | total_video_views |
|---|---|---|---|---|---|
| 1321 | 3 | 2022-06-20T00:00:00.000Z | 100 | 750 | 1000 |
| 1322 | 0 | 0 | 0 | 0 | |
| 1323 | 0 | 77 | 575 | 775 |
You're working with the Data Science Team at Instagram to build an alogorithm to create a personalized experience for each user on the platform.
Include all users even those that did not post or had a session. If they don't have posts, comment, likes or video views, default their value to 0.
For that, they need the following information for each user:
Here are the tables available to you:
users table:
| Column Name | Description |
|---|---|
| user_id | Unique identifier for each user |
| signup_date | The date when the user signed up |
posts table:
| Column Name | Description |
|---|---|
| post_id | Unique identifier for each Instagram post |
| user_id | Identifier for the user who created the post |
| posted_date | Date when the post was made |
sessions table:
| Column Name | Description |
|---|---|
| session_id | Unique identifier for each Instagram session |
| user_id | Identifier for the user involved in the session |
| session_date | Date of the session |
| nb_comments | Number of comments made during the session |
| nb_likes | Number of likes received during the session |
| nb_video_views | Number of video views during the session |
| user_id | total_posts | most_recent_post | total_comments | total_likes | total_video_views |
|---|---|---|---|---|---|
| 1321 | 3 | 2022-06-20T00:00:00.000Z | 100 | 750 | 1000 |
| 1322 | 0 | 0 | 0 | 0 | |
| 1323 | 0 |
| 77 |
| 575 |
| 775 |