SELECT 
	p.record_number,
	p.Name, 
	p.Thumbnail_Image, 
	p.Base_Price,
	SUM(oi.Quantity) AS Total_Sold, 
	SUM(oi.Item_Subtotal) AS Total_Sales,
	p.Image,
	p.Product_Code,
	p.Date_Added_to_Cart
FROM 
	`Products` p
LEFT JOIN
	Ordered_Items oi 
ON
	p.record_number = oi.Item_rn