开发者

Get from the rows highest result

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜