Ако искате данни за всички дни, използвайте това
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;
Ако искате данните за конкретна дата, можете да използвате това:
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;