Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Healthy Shop database
MULTIPLE JOINs – Exercises
8. Exercise 4


Good! Keep it up!


For each product display:

  • the name of the company that produced it (alias the column to producer_name),
  • the name of the department where the product is located (alias it to department_name),
  • the name of the product (alias it to product_name),
  • 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.

Stuck? Here's a hint!

Use LEFT JOINs while connecting tables.


SELECT AS producer_name, AS department_name, AS product_name,
FROM product p
LEFT JOIN producer prod
  ON = p.producer_id
LEFT JOIN department d
  ON = p.department_id
LEFT JOIN nutrition_data nd
  ON nd.product_id =