End of Summer - hours only!Up to 80% off on all courses and bundles.-Close
9. Exercise 5


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


How many recipes are assigned to each preference rating?

Only select ratings with more than one recipe. Name the columns rating and number_of_recipes.

Stuck? Here's a hint!

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