SQLite Forum

Select and count from 2 tables
Login
How about translate directly from the English requirements statement into SQL?

```
   select movie_id 
     from genremap, genres 
    where genremap.genre_id == genres.genre_id 
      and genre_name == 'Romance'
INTERSECT
   select movie_id
     from genremap, genres
    where genremap.genre_id == genres.genre_id 
      and genre_name == 'Comedy'
;
```

Also note that although pretty pictures may be pretty they are generally not useful.  Textual description of the relevant tables is more environmentally friendly and wastes less energy and time.