CS50_Labs/Lab7/movies/13.sql

7 lines
341 B
SQL

select distinct people.name from movies
join stars on people.id = stars.person_id
join people on stars.movie_id = movies.id
where people.name != "Kevin Bacon" and title in (select title from movies
join stars on people.id = stars.person_id
join people on stars.movie_id = movies.id
where people.name = "Kevin Bacon" and people.birth = 1958);