Results 1 to 2 of 2
-
January 7th, 2014, 02:51 PM #1cad4321 Guest
Getting count for each product and its name
Hi,
I am trying to get total number of products in different departmental stores and i also want to get the name of the product. I have this query.
Select count(prod) as cnt, prodname from distribution
not working
-
January 7th, 2014, 02:54 PM #2Chand Guest
use group by
so
Select count(prod) as cnt, prodname from distribution group by prodname
you can't use count without group by
Bookmarks