Reply to Re: Count Number of Items in each Category
Posted by Barkster on 04/10/06 17:13
Figured it out, was close to what you mentioned
Select
Category.CategoryID,
Category.Category,
Category.Sorting,
Count(Listings.CategoryID) as cnt
From
Category LEFT JOIN Listings on(Listings.CategoryID=Category.CategoryID)
Group By
Category.CategoryID
Order By
Category.Sorting Asc