Wish wants a daily engagement report for users interacting with the Wish marketplace. Using the tables below, write a PostgreSQL query for activity from January 1 through January 5, 2025.
daily_active_users as the distinct number of registered users with at least one activity event on that date.daily_churned_users as users active on the previous day who have no activity on the current day. Do not count users who were not active on the previous day.activity_date.Deduplicate multiple activity events from the same user on the same date before calculating either metric.
| Column | Type | Description |
|---|---|---|
| user_idPK | INTEGER | Unique Wish user identifier |
| display_name | VARCHAR(100) | User display name |
| Column | Type | Description |
|---|---|---|
| activity_idPK | INTEGER | Unique activity event identifier |
| user_id | INTEGER | User associated with the activity event |
| activity_date | DATE | Calendar date of the activity event |
| event_type | VARCHAR(40) | Type of marketplace activity |