First timer asking on Stack Exchange. I have a SQL query that returns 6 results in the terminal but does not work with check50 resulting in
"Query did not return any results"
I read in a similar question using to swop from using IDs to using the names of the actors instead. This does nothing to change the result in the VS code terminal but when I submit to check50 I still get the error.
The result I am expecting is
Alice Through the Looking Glass
Alice in Wonderland
Charlie and the Chocolate Factory
Corpse Bride
Dark Shadows
Sweeney Todd: The Demon Barber of Fleet Street
My code is here:
SELECT movies.title
FROM movies
INNER JOIN stars
ON stars.movie_id = movies.id
INNER JOIN people
ON people.id = stars.person_id
WHERE people.id = 136
INTERSECT
SELECT movies.title
FROM movies
INNER JOIN stars
ON stars.movie_id = movies.id
INNER JOIN people
ON people.id = stars.person_id
-- HELENA BONHAM CARTER
WHERE people.id = 307;
Can anyone see any error in this code or is there something else I should consider.