Quiz
7. Task 6: Set operations

Instruction

Unbelievable! How about set operations: unions, differences and intersections? Do you still remember them? Take a look:

GlutenFreeProduct (Id, Type, Name, Calories, Price)

VegetarianProduct (Id, Type, Name, Calories, Price)

As you can see, we are now inside a dietician's office. We have two tables with the same columns: products that are gluten free and vegetarian products. Each product has its own ID, type (meat, dairy etc.), name, number of calories per portion, and price.

Exercise

Show all columns for products that are both gluten free and vegetarian.

Stuck? Here's a hint!

Use the following template to help you build your query:

SELECT
  ...
FROM ...
INTERSECT
SELECT
  ...
FROM ...;