I hope i can explain my problem:
Let’s say i have a Movies table and a Genres table:
- genres [n] (each movie can have more than 1 genre)
Let’s say i have 3 movies in DB : Movie1 has [Action], Movie2 has [Comedy], Movie3 has [Action, Comedy].
How would i write the subquery for the WHERE clause, if i wanted all the movies where genres are ‘Action’ OR ‘Comedy’, without getting duplicate results?
Because right now, if i write in the where clause ‘genres.description=‘Action’ OR genres.description=‘Comedy’’, Movie3 appears in results twice.