Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 intprimary key, autoincrement
dirfirstName varcharnot null
dirlastName varcharnot null
genre
id intprimary key, autoincrement
gentitle varcharnot null
rating
revid intnot null
movid intnot null
revrating decimalnot null
PRIMARY KEY revidmovid
FOREIGN KEY movidREFERENCES movie idON DELETE CASCADE ON UPDATE CASCADE
FOREIGN KEY revidREFERENCES reviewer idON DELETE CASCADE ON UPDATE CASCADE
reviewer
id intprimary key, autoincrement
revname varchardefault null
movie
id intprimary key, autoincrement
movtitle varcharnot null
movyear intnot null
movtime intnot null
movlang varcharnot null
movdtrel varchardefault null
movrelcountry varcharnot null
genid intnot null
dirid intnot null
FOREIGN KEY diridREFERENCES director idON DELETE CASCADE ON UPDATE CASCADE
FOREIGN KEY genidREFERENCES genre idON 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 moviesSCREENSHOT
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