engineering computer science MCQ #698

What is the purpose of the HAVING clause in SQL?

engineering computer science MCQ #698

  1. Question 1

    Q1. What is the purpose of the HAVING clause in SQL?

    • A) To filter data based on conditions before grouping
    • B) To filter data based on conditions after grouping
    • C) To sort data in ascending order
    • D) To join two tables

    Answer: To filter data based on conditions after grouping

    Explanation: The HAVING clause filters grouped data based on conditions, allowing aggregate functions to be applied to the filtered groups.