MySQL Forums
Forum List  »  Newbie

Correlated subquries
Posted by: Patrice Patrice
Date: April 11, 2016 07:54AM

Hi everyone.
Here I have a table name movies with this schema

movies(title,year, length, genre, studioName, producerCertN)

I want to find titles that have been used for two or more movies.
I have used this query

SELECT title FROM movies Old WHERE year<ANY(SELECT year FROM movies WHERE title=Old.title);

This works well but my teacher has asked me to rewrite the query without any subqueries. Is there someone who can show me how i can do this? Thanks in advance.

Options: ReplyQuote


Subject
Written By
Posted
Correlated subquries
April 11, 2016 07:54AM
April 11, 2016 10:27AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.