Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:
Originally posted by: bfinelsen
Phil,
I changed the query to make my tables and field names:
SELECT c.Categories, COUNT(p.ProductID) AS prodCount
FROM Products p
INNER JOIN Categories c ON c.categories = p.category
GROUP BY c.Categories
And what it appears to be doing is counting how many of the category names were used in the database rather than how many of each. I have 25 category names and 24 of them are being used (All is the other category used to select all of them, but it is not specified in any single record). So now, next to each category name, I have (24) listed for all of them. This seems to be a start, but not exactly what I'm trying to accomplish. What am I doing wrong?
Copy link to clipboard
Copied
Copy link to clipboard
Copied