DataBase movies.db
tables
directors (movie_id, person_id)
movies (id, title, year)
people
I solved this problem by using DISTINCT and NOT EQUAL operator in SQL.
Here are the steps I took:
SELECT DISTINCT(name)
FROM people
JOIN stars ON stars.person_id = people.id
JOIN movies ON movies.id = stars.movie_id
WHERE movies.id IN
(SELECT movie_id
FROM movies
JOIN stars ON stars.movie_id = movies.id
JOIN people ON people.id = stars.person_id
WHERE people.name = "Kevin Bacon"
AND people.birth = 1958)
AND people.name != "Kevin Bacon";
Result is 176 distinct rows of names.