Correlated Queries
SELECT title
FROM Movie AS Old
WHERE year < ANY
(SELECT year
FROM Movie
WHERE title = Old.title);
Movie (title, year, director, length)
Movie titles are not unique (titles may reappear in a later year).
Find movies whose title appears more than once.
Note scope of variables
Previous slide
Next slide
Back to first slide
View graphic version