Your question is SQL Conversion Rate Before/After. 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+ France launched a new Watchlist feature and wants to evaluate whether it improved session conversion. A converted session is one where converted is TRUE.
Write a PostgreSQL query that compares conversion performance during the 30 days before and the 30 days after the Watchlist launch on 2025-03-15.
NULL conversion flags as non-converted sessions, prevent division by zero, and order periods chronologically.| Column | Type | Description |
|---|---|---|
| launch_idPK | INT | Unique feature launch identifier |
| feature_name | VARCHAR(100) | Name of the Disney+ France feature |
| launch_date | DATE | Date when the feature launched |
| Column | Type | Description |
|---|---|---|
| session_idPK | INT | Unique viewing session identifier |
| user_id | INT | Viewer identifier |
| session_date | DATE | Date of the app session |
| converted | BOOLEAN | Whether the session resulted in conversion |