Why this code doesn’t work? It should output 19.325 rows. I only get 4 rows. Meanwhile, it worked well when I used JOIN
SELECT DISTINCT name
FROM people
WHERE id IN
(
SELECT person_id
FROM stars
WHERE movie_id =
(
SELECT id
FROM movies
WHERE year = 2004
)
);
New contributor