开发者

mysql query data group

开发者 https://www.devze.com 2023-01-27 10:41 出处:网络
I have a mysql table like that and i need开发者_开发知识库 to run a query which will output the following result

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

精彩评论

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