Om du vill ha data för alla dagar använd detta
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;
Om du vill ha data på datumspecifika kan du använda detta:
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;