SELECT 
	p.record_number,
	p.Name, 
	p.Thumbnail_Image, 
	p.Base_Price,
	p.Image,
	p.Product_Code,
	p.Date_Added_to_Cart,
	SUM(pw.Stock) AS Total_Stock
FROM 
	`Products` p
LEFT JOIN
	REL_Products__Warehouses pw 
ON
	p.record_number = pw.Products_rn