Your question is User Watch Percentage by Show. 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.
Paramount+ wants to measure the reach of a specific show across its registered users. Write a PostgreSQL query that calculates the percentage of all users who watched Star Trek: Strange New Worlds at least once.
users as the denominator, including users with no views.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique Paramount+ user identifier |
| VARCHAR(255) | User email address | |
| subscription_tier | VARCHAR(20) | Current subscription plan |
| Column | Type | Description |
|---|---|---|
| view_idPK | INT | Unique viewing event identifier |
| user_id | INT | User associated with the viewing event |
| show_title | VARCHAR(150) | Title of the show watched |
| viewed_at | TIMESTAMP | Timestamp when the view occurred |