Your question is Weekly Signup Cohort Retention. 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.
StreamWave wants to measure early user retention by signup cohort. Write a SQL query to calculate week-over-week retention for users who signed up in the last 90 days.
signup_date, using DATE_TRUNC('week', signup_date).signup_date is within the last 90 days relative to DATE '2024-06-30'.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| signup_date | DATE | Date the user signed up |
| acquisition_channel | VARCHAR(50) | Marketing channel that acquired the user |
| Column | Type | Description |
|---|---|---|
| activity_idPK | INT | Unique activity event identifier |
| user_id | INT | User who performed the activity |
| activity_date | DATE | Date of the activity |
| activity_type | VARCHAR(50) | Type of user activity |