hi guys,I have two tables, with the subcatID as PK and FK. And want to get the count of the subcat in the foreign table and also list subcat names.Here is my codeSELECT dbo.sub_categories.name, COUNT(dbo.Training_courses.subcategoryID) AS Expr1, dbo.Training_courses.subcategoryIDFROM dbo.sub_categories INNER JOIN dbo.Training_courses ON dbo.sub_categories.subcategoryID = dbo.Training_courses.subcategoryIDGROUP BY dbo.sub_categories.name, dbo.Training_courses.Coursename, dbo.Training_courses.subcategoryID
_____________________Yes O !