User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
It would be nice to have the MODE of a field as a native measure, so that one
will be able to do queries like
SELECT MODE(X), MEDIAN(Y) .... from ... group by ....
MODE(X) would return the equivalent of
select "X" from (select "X", count(1) as "count" from "T0" group by "X") as "T1" order by "count" desc limit 1;
but with the advantage of being able to specify other measures in the same query, and more importantly, being able to use the query with the mode function as a sub-query