Find US Customers Who Rented and Streamed Videos in Early February
 

Write a SQL query to return the US customers who rented a video on February 1st, 2023, and then streamed the same video between February 2nd and February 8th, 2023. Use the tables playground.rental for rental data and playground.streams for streaming data. The output should include unique user IDs of these customers ordered in ascending order.

These are the tables to query for this question:
playground.rental
  • country string
  • rental_date date
  • rental_id int
  • user_id int
playground.streams
  • country string
  • stream_date date
  • rental_id int
  • user_id int
  • device_type string
  • minutes_streamed int
Your answer should include these columns:
  • user_id integer

Querying is only for logged in users!

Write Your Query Here (you can run selections by highlighting!)

Query Results

No queries have been run yet.