Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Quiz
10. Exercise 6
Congratulations

Instruction

Good job! Now let's go on to the following exercise in joining tables.

Exercise

Each recipe contains a different number of ingredients. Find the number of ingredients in each recipe. Select only those recipes which have fewer than 5 ingredients. Display the recipe name and its number of ingredients (name the column number_of_ingredients).

Stuck? Here's a hint!

To count ingredients, use the COUNT aggregate function. To filter aggregate values, you need the HAVING clause. To review the HAVING clause, look at Basics of PostgreSQL Part 4: Aggregation and grouping.