Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following set of relations describes a sales system, in which the primary keys have been underlined, and foreign keys are marked with ana asterix;

The following set of relations describes a sales system, in which the primary keys have been underlined, and foreign keys are marked with ana asterix;
actor (actorID, firstName, lastName, gender)
movie (moxieID, title, year, time, language, releaseDate)
moxieCast (*actorID *movieID, role)
reviewer (reviewerID, name)
rating (?** movieID * reviewerID, stars, ratingNumber)
Write SQL queries to answer the following:
(a) Write a SQL query to find those movies, which were released before 1998. Return movie title.
(b) Write a SQL query to find the name of all reviewers and movies together in a single list.
(c) Write a SQL query to find the movie titles that contain the word 'Boogie Nights'. Sort the result-set in ascending order by movie year. Return movie ID, movie title and movie release year.
(d) Write a SQL query to find the movies with ID 905 or 907 or 917.
(e) Write a SQL query to find the movies without any rating.
(f) Write a SQL query to find all reviewers who have rated seven or more stars to their rating.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions