SELECT ProductGroupId,ObjectId,GroupName,Featured,Hidden,CreatedOn,DisplayOrder, count(productid) as cnt
FROM ProductGroup a, product b
WHERE ObjectId = 31
a.productgroupid = b.productgroupid
GROUP BY a.Productgroupid
This query is not correct because Groupby is only on one field and the fieldnames selected are many. But I want all this info along with number of products in each productgroup.
Could anyone help me?
Thanks
FROM ProductGroup a, product b
WHERE ObjectId = 31
a.productgroupid = b.productgroupid
GROUP BY a.Productgroupid
This query is not correct because Groupby is only on one field and the fieldnames selected are many. But I want all this info along with number of products in each productgroup.
Could anyone help me?
Thanks