Given two tables (users and events), how would you calculate the retention rate for a cohort of users?
For this exercise, use users who signed up in January 2024 and evaluate retention during the signup month and the following two months. Count a user at most once per retention month, even if they have multiple events.
month_offset, cohort_size, retained_users, and retention_rate.month_offset ascending. Return retention rate as a percentage rounded to two decimal places.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| signup_date | DATE | Date the user signed up |
| plan | VARCHAR(30) | User subscription plan |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique event identifier |
| user_id | INT | User associated with the event |
| event_at | TIMESTAMP | Timestamp when the event occurred |
| event_name | VARCHAR(50) | Name of the recorded event |