CS50 PSet 7 Movies (9.sql )

  Kiến thức lập trình

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

Mina Tadros is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT