Is there a simpler way to find MODE(S) of some values in MySQL
MODE is the value that occurs the MOST times in the data, there can be ONE MODE or MANY MODES here's some values in two tables ( sqlFiddle ) create table t100(id int auto_increment primary key, value int); create table t200(id int auto_increment primary key, value int); insert into t100(value) values (1), (2),(2),(2), (3),(3), (4); insert into t200(value) values (1), (2),(2),(2), (3),(3), (4),(4),(4); right now, to get the MODE(S) returned as comma separated list, I run the below query for table t100 SELECT GROUP_CONCAT(value) as modes,occurs FROM (SELECT value,occurs FROM (SELECT value,count(