Great, many thanks guys. Ian
On 25/01/2011 14:59, Igor Tandetnik wrote: > Ian Hardingham<[email protected]> wrote: >> ratingsTable (id INTEGER PRIMARY KEY AUTOINCREMENT, mtId INTEGER, user >> TEXT, rating INTEGER); >> >> I wish to have a query which gives me the mtId which is represented most >> often in the ratingsTable. > select mtId from ratingsTable group by mtId order by count(*) desc limit 1; > _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

