Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please provide a solution that does not use EXCEPT, please use NOT EXISTS in query. Task Question 7 Return the id and name of all
Please provide a solution that does not use EXCEPT, please use NOT EXISTS in query.
Task Question 7 Return the id and name of all customers who have previewed at least all the movies previewed by customers who were born on the "2000-10-10". Customers born on 2000-10-10" should not be included in the final list. This query should return a table with two columns, the first being user ids and the second being users names. Hint: Correlated Subquery c7.txt or c7.sql Maximum Number of Queries 1 Explanation File Name SQL Solution A relational database has been setup to track customer browsing activity for an online movie streaming service called SurfTheStream. Movies are identified by a unique code that consists of a four-character prefix and four-digit suffix. Additionally, each movie is assigned a content rating which must be one of the following options: "G", "PG", "M", "MA15+" or "R18+". The first time a customer previews a movie is captured by the database. Customers may preview a movie before they stream it, however, they cannot preview a movie after they have started to stream it. You may assume "Duration" refers to the time in seconds a customer has spent streaming a particular movie after the "Timestamp". A simplified version of their database schema has been provided below including foreign key constraints. You should consult the provided blank database import file for further constraints which may be acting within the system. Relational Schema Customer id, name, dob, bestfriend, subscriptionLevel] Customer bestfriend references Customer.id Customer.subscriptionLevel references Subscription.level Movie (prefix, suffix, name, description, rating, release Date] Previews [customer, moviePrefix, movieSuffix, timestamp] Previews.customer references Customer.id Previews.{moviePrefix, movieSuffix} reference Movie {prefix, suffix} Streams (customer, moviePrefix, movieSuffix, timestamp, duration] Streams.customer reference Customer.id Streams.{moviePrefix, movieSuffix} reference Movie {prefix, suffix} Subscription [level]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started