Re: selecting the single most common value from a certain column?
Ciaran wrote:
> Hi is there a way of selecting the single most common value from a
> certain column in a mysql table?
>
> Thanks a lot,
> Ciarán
SELECT column_name, count(*) as quantity
FROM table_name
GROUP BY column_name
ORDER BY quantity DESC
LIMIT 1
|