Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Quiz
7. Exercise 3
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 the number of ingredients. Name the column NumberOfIngredients.

Stuck? Here's a hint!

To count ingredients, use the COUNT aggregate function. For filtering aggregate values you need the HAVING clause. If you don't remember the HAVING clause, look at SQL Basics in SQL Server course. Part 4: Aggregation and grouping.