Practice Interview Questions
| Question | Status |
|---|---|
Assume you have the user_actions table that contains information on Facebook user actions.
Write a query to obtain the number of active users as of July 2022.
An active user is a user who has one of these actions ("sign-in", "like", or "comment") in the current month and last month.
user_actions table:
| Column Name | Description |
|---|---|
| user_id | Unique identifier for each user. |
| event_id | Unique identifier for each user action. |
| event_type | Type of user action (e.g sign-in) |
| event_date | Time the action occurred |
| active_users |
|---|
| 4 |
Assume you have the user_actions table that contains information on Facebook user actions.
Write a query to obtain the number of active users as of July 2022.
An active user is a user who has one of these actions ("sign-in", "like", or "comment") in the current month and last month.
user_actions table:
| Column Name | Description |
|---|---|
| user_id | Unique identifier for each user. |
| event_id | Unique identifier for each user action. |
| event_type | Type of user action (e.g sign-in) |
| event_date | Time the action occurred |
| active_users |
|---|
| 4 |