开发者

mysql query data group

I have a mysql table like that

mysql query data group

and i need开发者_开发知识库 to run a query which will output the following result

mysql query data group

what will be mysql query for that?any suggestions please?


You need to use a GROUP BY.

SELECT data, count(*) 
FROM   your_table 
GROUP BY 
       data
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜