The shop really wants to keep all its customers well informed. That's why every product has a calories label available. The information about the calorie count of a product is stored in the
We have three tables to work with. That means we can join all three of them in a single query which allows us to select data from these three tables at the same time. Take a look:
ON product.department_id = department.id
ON nutrition_data.product_id = product.id
WHERE department.name = 'bakery'
We first join the
product table with the
department table and then join that resulting table with the