
9. Exercise 5


Excellent! Let's proceed with another exercise to verify your skills in using GROUP BY and HAVING clauses.


How many recipes are assigned to each preference rating?

Only select ratings with the number of recipes higher than 1. Name the columns rating and number_of_recipes.

Stuck? Here's a hint!

To count recipes, use COUNT aggregate function. For filtering aggregate values you must use the HAVING clause. You can review SQL Basics course, Part 4: Aggregation and grouping for reminders about how to use GROUP BY.