Step 1: Understanding the Concept:
In SQL, the ‘HAVING‘ clause is used to filter results after a ‘GROUP BY‘ operation, whereas the ‘WHERE‘ clause filters individual rows before grouping.
Step 2: Detailed Explanation:
1. To calculate an average per category, you must use ‘GROUP BY Category‘.
2. To filter the aggregated result (the average price), you must use the ‘HAVING‘ clause rather than ‘WHERE‘.
Step 3: Final Answer:
The correct query is: SELECT Category FROM Products GROUP BY Category HAVING AVG(Price) > 50;