In SQL, which clause is used to filter groups created by GROUP BY ?

2026

In SQL, which clause is used to filter groups created by GROUP BY ?

Answer: B. HAVINGIn SQL, the HAVING clause is used to filter groups created by GROUP BY. The WHERE clause filters individual rows before grouping occurs, whereas HAVING…

  1. A.

    WHERE

  2. B.

    HAVING

  3. C.

    ORDER BY

  4. D.

    FILTER

Attempted by 561 students.

Show answer & explanation

Correct answer: B

In SQL, the HAVING clause is used to filter groups created by GROUP BY. The WHERE clause filters individual rows before grouping occurs, whereas HAVING operates on the aggregated groups.

Explore the full course: Tpsc Assistant Technical Officer

Loading lesson…