How to use SQL GROUP BY statement in MySQL

1 Answer

0 votes
SELECT category, COUNT(category) AS category_count 
FROM all_info
GROUP BY category

-- run:

--  category 	category_count 
--     aaa               28
--     bbb                3

 



answered Oct 5, 2015 by avibootz
edited Oct 15, 2015 by avibootz
...