SELECT 
	c.record_number
	,c.Name
	,c.Image_of_Name
	,Image
	,COUNT(DISTINCT pc.record_number) AS `# Products`
	,SUM(oi.Item_Subtotal) AS `Total_Sales`
	,SUM(oi.Quantity) AS `# Products Sold`
FROM
	Categories c
LEFT JOIN
	REL_Products__Categories pc 
ON
	c.record_number = pc.Categories_rn
LEFT JOIN
	Ordered_Items oi
ON
	pc.Products_rn = oi.Item_rn