What is the difference between WHERE and HAVING clauses in SQL?
Answer options
A
WHERE filters groups, HAVING filters rows
B
WHERE filters rows before grouping, HAVING filters groups after aggregation
C
They are interchangeable
D
WHERE works only with JOIN, HAVING works only with GROUP BY
Correct answer: WHERE filters rows before grouping, HAVING filters groups after aggregation
Explanation
Quick AnswerThe correct answer is WHERE filters rows before grouping, HAVING filters groups after aggregation because it directly addresses the core logic of Database Management.
This question has been retained as-is due to its unique context.