Task 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 Explanation File Name Maximum Number of Queries 1 SQL Solution
Please solve Question 7 using the SQL command 'NOT EXISTS'.
Other relative info includes the data tables below:
TABLE `Streams` (
`customer` int NOT NULL,
`moviePrefix` char(4) NOT NULL,
`movieSuffix` char(4) NOT NULL,
`timestamp` timestamp NOT NULL,
`duration` int NOT NULL
TABLE `Previews` (
`customer` int NOT NULL,
`moviePrefix` char(4) NOT NULL,
`movieSuffix` char(4) NOT NULL,
`timestamp` timestamp NOT NULL
TABLE `Movie` (
`prefix` char(4) NOT NULL,
`suffix` char(4) NOT NULL,
`name` varchar(255) NOT NULL,
`description` text NOT NULL,
`rating` enum('G','PG','M','MA15+','R18+') NOT NULL,
`releaseDate` date DEFAULT NULL
TABLE `Customer` (
`id` int NOT NULL,
`name` varchar(255) NOT NULL,
`dob` date NOT NULL,
`bestFriend` int DEFAULT NULL,
`subscriptionLevel` varchar(25) NOT NULL
![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, releaseDate]
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]](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F72bdab55-fd8a-4a98-b1cf-568142814928%2Faf9c9de1-2c7a-40cd-a53c-8bde0fa949d3%2F78ijghg_processed.png&w=3840&q=75)
![Question 7
Task
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.
Explanation
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
File Name
SQL Solution
Maximum Number of Queries
1](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F72bdab55-fd8a-4a98-b1cf-568142814928%2Faf9c9de1-2c7a-40cd-a53c-8bde0fa949d3%2Fe9faie_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)