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;

-- 
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to