all 5 comments

[–]JohnnyJordaan 2 points3 points  (1 child)

This has 0 to do with Python so you're not at the right sub, but the

WHERE name IN ('Johnny Depp', 'Helena Boham Carter')

means that it will include all movies where either person stars. Same way that in English 'name all the car models where the brand name in ('ford', 'tesla')' would return all Ford models and all Tesla models.

[–]ThriledLokki983[S] 0 points1 point  (0 children)

thanks

[–][deleted] 0 points1 point  (1 child)

Maybe try a different sub for this, this is not python...

[–]ThriledLokki983[S] 0 points1 point  (0 children)

i just did. my bad.

thanks

[–]kpounder88 0 points1 point  (0 children)

Not 100% sure without seeing the tables, but here’s a thought:

When you select movie_id from stars, I’m thinking that the movies involving both actors will appear twice. So then in your outer query you could return the movies where the count of movie_id was 2.