Your question is Meta Signup Month Retention Cohorts. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Meta’s marketing analytics team wants a monthly cohort retention view for new user signups. Write a SQL query to measure how many users returned in each month after their signup month.
signup_date from the facebook_users table.facebook_activity during that calendar month.signup_month and months_since_signup.signup_monthmonths_since_signup where signup month is 0, the next month is 1, etc.cohort_sizeretained_usersretention_rate rounded to 4 decimal placesactivity_date.signup_month, then months_since_signup.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| signup_date | DATE | Date the user signed up |
| acquisition_channel | VARCHAR(50) | Marketing acquisition source |
| Column | Type | Description |
|---|---|---|
| activity_idPK | INT | Unique activity identifier |
| user_id | INT | User who generated the activity |
| activity_date | DATE | Date of the activity |
| surface_name | VARCHAR(50) | Meta surface where activity happened |