Your question is SQL Retention Rate Query. 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.
Disney+ analytics needs to measure how many users from a January 2025 signup cohort returned to watch content during February 2025. Write a PostgreSQL query that calculates the cohort size, retained users, and retention rate.
signup_date is from January 1 through January 31, 2025.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| signup_date | DATE | Date the user registered |
| plan_name | VARCHAR(30) | Disney+ subscription plan |
| region | VARCHAR(30) | User's market region |
| Column | Type | Description |
|---|---|---|
| session_idPK | INT | Unique viewing session identifier |
| user_id | INT | User associated with the session |
| session_date | DATE | Date of the viewing session |
| device_type | VARCHAR(20) | Device used for viewing |
| minutes_watched | INT | Minutes watched during the session |