开发者

Get from the rows highest result

开发者 https://www.devze.com 2023-03-14 20:11 出处:网络
I want to get the highest result from all rows in a colum, for example. Column food drink food food food dring

I want to get the highest result from all rows in a colum, for example. Column

food
drink
food
food
food
dring
food
chicken
else
chicken

I i want to get that rows that have the highest numbers, that are mostly used like i my way food, so how to get that food ? I want to check all the rows, and get the most u开发者_开发百科sed one .


SELECT foodName FROM tbl GROUP BY foodName ORDER BY count(*) DESC
0

精彩评论

暂无评论...
验证码 换一张
取 消