the total number of carbohydrates in the product.
Your query should still consider products with no information about producer_id, department_id or product_ids.
Use LEFT JOINs while connecting tables.