Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For all cases where the same reviewer rated the same movie twice and gave it a higher rating the second time, return the reviewer's name

For all cases where the same reviewer rated the same movie twice and gave it a higher rating the second time, return the reviewer's name and the title of the movie.

how to understand these SQL query?

select Reviewer.name, Movie.title from Reviewer, Movie, (select R1.rID, R1.mID from Rating R1, Rating R2 where R1.rID=R2.rID and R1.mID=R2.mID and R2.ratingDate>R1.ratingDate and R2.stars>R1.stars) as T where Reviewer.rID=T.rID and Movie.mID=T.mID

expecially,why add"()" here???thank u!

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

More Books

Students also viewed these Databases questions

Question

6 Transfer does not happen by chance. Discuss

Answered: 1 week ago