Question: Using the following database schema I need help with the below questions: Database: moviesfull Tables: director id ( int , primary key, auto - increment
Using the following database schema I need help with the below questions:
Database: moviesfull
Tables:
director
id int primary key, autoincrement
dirfirstName varchar not null
dirlastName varchar not null
genre
id int primary key, autoincrement
gentitle varchar not null
rating
revid int not null
movid int not null
revrating decimal not null
PRIMARY KEY revid movid
FOREIGN KEY movid REFERENCES movie id ON DELETE CASCADE ON UPDATE CASCADE
FOREIGN KEY revid REFERENCES reviewer id ON DELETE CASCADE ON UPDATE CASCADE
reviewer
id int primary key, autoincrement
revname varchar default null
movie
id int primary key, autoincrement
movtitle varchar not null
movyear int not null
movtime int not null
movlang varchar not null
movdtrel varchar default null
movrelcountry varchar not null
genid int not null
dirid int not null
FOREIGN KEY dirid REFERENCES director id ON DELETE CASCADE ON UPDATE CASCADE
FOREIGN KEY genid REFERENCES genre id ON DELETE CASCADE ON UPDATE CASCADE
Complete the problems. Use a subquery in each problem.
Show the movie genres with an average rating above for all genres except SCREENSHOT
Show all movies with more than ratings and are in a language other than Italian. SCREENSHOT
Show all movies with an average rating less than and a release year between Order by year descending. SCREENSHOT
PART
Complete the following problems. # and # do not require a subquery
Show the languages of each movie released before SCREENSHOT
Show all movies with more than ratings that are in a language different from any movie released before SCREENSHOT
Hint: Show all movies with more than ratings that are in a language Not In the result of your subquery from #
Show the reviewers that have a reviewing average over The average of all the ratings they've given is greater than SCREENSHOT
Show all the movies that were rated by reviewers with an average rating greater than In other words, show all the movies that the reviewers from the previous question have ratedSCREENSHOT
Hint: Use the query from # as a subquery
Complete the following problems using a subquery.
Show the movies that have received the highest possible rating.
Hint: The highest possible rating is the maximum rating SCREENSHOT
Show the movie genres with an average rating above for genres with at least movies. SCREENSHOT
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
