22 | | SELECT m.movie_title |
23 | | FROM movies m |
24 | | JOIN movie_genre mg ON m.identifier = mg.movie_id |
25 | | JOIN genre g ON mg.genre_id = g.identifier |
26 | | WHERE g.genre IN ('scifi', 'comedy') |
27 | | GROUP BY m.movie_title |
28 | | HAVING COUNT(DISTINCT g.genre) = 2; |
| 22 | SELECT movies.movie_title |
| 23 | FROM movies |
| 24 | JOIN movie_genre ON movies.identifier = movie_genre.movie_id |
| 25 | JOIN genre ON movie_genre.genre_id = genre.identifier |
| 26 | WHERE genre.genre IN ('scifi', 'comedy') |
| 27 | GROUP BY movies.movie_title |
| 28 | HAVING COUNT(DISTINCT genre.genre) = 2; |