You have specified how the movies table relates to the other tables, but you haven't specified any independent selection criteria for any tables. For example, in your query you need to add something like: and genres.genre = 'drama'. For this query, only the movies and genres tables are needed because you aren't selecting any fields from the other tables, from what I can tell.
Running through a few online SQL tutorials will help you get a better feel for how SQL works. Jim On 3/10/09, Yuzem <naujnit...@gmail.com> wrote: > > 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 = .... > > This is what I have: > sqlite3 movies.db "select movies.id,title,year from > movies,genres,countries,languages,keywords,tags where movies.id = genres.id > and movies.id = countries.id and movies.id = languages.id and movies.id = > keywords.id and movies.id = tags.id" > > There is no query and it is giving me nothing... > Many thanks in advance! > -- > View this message in context: > http://www.nabble.com/I-need-help-with-very-complex-queries-tp22446301p22446301.html > Sent from the SQLite mailing list archive at Nabble.com. > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Software first. Software lasts! _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users