70
Correlated Queries
SELECT
DISTINCT
title
FROM
Movie AS x
WHERE
year <>
ANY
(
SELECT
year
FROM
Movie
WHERE
title =
x
.title);
Movie (
title,
year
,
director, length)
Find movies whose title appears more than once.
Note (1) scope of variables (2) this can still be expressed as single SFW
correlation