Your question is SQL for User Behavior. Start with the requirements and the three 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.
How would you write a SQL query to answer a business question about user behavior at Paramount? Using the supplied users, viewing_sessions, and titles tables, return users with at least two completed viewing sessions during January 2026.
user_id, display_name, subscription_plan, completed_sessions, total_watch_minutes, distinct_titles, and engagement_leveltotal_watch_minutes descending, then user_id ascending| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique Paramount+ user identifier |
| display_name | VARCHAR(100) | User display name |
| subscription_plan | VARCHAR(30) | Current Paramount+ subscription plan |
| Column | Type | Description |
|---|---|---|
| session_idPK | INT | Unique viewing session identifier |
| user_id | INT | User associated with the session |
| title_id | INT | Watched title identifier |
| session_started | TIMESTAMP | Session start timestamp |
| session_ended | TIMESTAMP | Session end timestamp, null for incomplete sessions |
| watch_minutes | INT | Minutes watched during the session |
| Column | Type | Description |
|---|---|---|
| title_idPK | INT | Unique Paramount+ title identifier |
| title_name | VARCHAR(150) | Title name |
| genre | VARCHAR(50) | Primary title genre |