Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT c.CategoryID, CategoryName, COUNT(distinct ProductID) AS '# of Products' FROM categories AS c
- INNER JOIN products AS p ON c.CategoryID = p.CategoryID
- GROUP BY CategoryID, CategoryName;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement