I am trying to figure out a way to find shared credits by two people in a movie database, for example:
table: 'credits'
columns: 'id','movie','person'
My other problem is a person might have multiple credits for the same movie, so how do I filter out duplicates? Any help would be appreciated. The following is what I have so far. Am I on the right track?
SELECT DISTINCT movie
FROM credits
WHERE person = 'condition1' OR person = 'condition2'
GROUP BY movie
HAVING COUNT(*)=2
role- editor, actor, producer etc)