Last Updated: May 10, 2026
For this exercise, we will work with below data:
From the users table, find every user on the premium subscription tier. Return username, country, and subscription_tier.
From the users table, find every user whose country is NOT 'US'. Return username and country.
From the users table, find every user whose timezone is NULL. Return username, country, and timezone.
From the streams table, find every stream where duration_listened is greater than 200 seconds. Return stream_id, user_id, and duration_listened
From the users table, find every user who signed up on or after 2024-01-01. Return username and signup_date, ordered by signup_date ascending.
From the streams table, find streams where duration_listened is at least 180 seconds but strictly less than 300 seconds. Return stream_id, user_id, and duration_listened, ordered by duration_listened descending.
From the users table, find every user who is NOT from the 'US', including users with NULL country. Return username and country, ordered by username ascending.
From the users table, find every user who is from 'US' and NOT on the 'free' tier, OR who is on the 'family' tier (regardless of country). Return username, country, and subscription_tier. Use parentheses to make the precedence explicit.