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 ?
- A.
WHERE
- B.
HAVING
- C.
ORDER BY
- D.
FILTER
Attempted by 209 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.