Hvis du vil have data for alle dage, så brug denne
SELECT products.product_name, sales.date, sum(products.quantity)
FROM products LEFT JOIN sales
ON products.sale_id = sales.id group by products.product_name, sales.date;
Hvis du vil have data på dato specifikke, kan du bruge dette:
SELECT products.product_name, sales.date, sum(products.quantity)
FROM products LEFT JOIN sales
ON products.sale_id = sales.id WHERE sales.date = '10 july' group by products.product_name, sales.date;