Types of HAVING clauses:
Used in SQL to filter groups of rows returned by GROUP BY — unlike WHERE, which filters individual rows.

Common Table Expression (CTE):
A powerful SQL feature introduced with the WITH keyword, used to:

Break complex queries into simpler, readable parts.

Improve maintainability.

Allow recursive queries or multiple reuse in the same query.