"Yuzem" <naujnit...@gmail.com> wrote in
message news:22446301.p...@talk.nabble.com
> As an example, I have:
> tables:
> movies genres keywords languages countries etc...
>
> movies columns:
> id title year director etc....
>
> The others are:
> id "name of the table" (example: id genres)
>
> The id in all the tables are the same column that is the id of the
> movie so that every movie can be many times in all the tables but
> only one time in movies.
>
> What I want to do is something like:
> select ... where genres = Horror and countries = italy and keywords =
> ....

select * from movies where
    movies.id in (select id from genres where genres='Horror') and
    movies.id in (select id from countries where countries='italy') and
    movies.id in (select id from keywords where keywords='....');

Igor Tandetnik 



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to