Thank you very much, that worked perfectly, I have one more question. Given the same schema, I can list all genres with one movie by genre: SELECT genres, movies FROM genres GROUP BY genres; Action|[movie id] Adventure|[movie id] Animation|[movie id] Biography|[movie id] Comedy|[movie id] Crime|[movie id] Documentary|[movie id] etc...
I want to get a specifed number of movies by genre, for example 3 movies by genres: Action|[movie id] Action|[movie id] Action|[movie id] Adventure|[movie id] Adventure|[movie id] Adventure|[movie id] Animation|[movie id] Animation|[movie id] Animation|[movie id] etc... Is that possible? Thanks again! -- View this message in context: http://sqlite.1065341.n5.nabble.com/How-can-I-improve-this-query-tp67470p67486.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