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


Good job! One more and we're done!


Show the name and price of each product in the 'fruits' and 'vegetables' departments. Consider only those products that are not produced by 'GoodFoods'.

Stuck? Here's a hint!

To get also products that don't have a producer, you'll need to join the producer table, like so:

FROM product p
LEFT JOIN producer prod
  ON p.producer_id =
JOIN department d
  ON = p.department_id

To make sure the products aren't produced by 'GoodFoods', use the following condition in WHERE:

( != 'GoodFoods' OR IS NULL)