The HAVING clause filters aggregated results and can only be used with SELECT statements that include GROUP BY. While WHERE filters individual rows before aggregation, HAVING filters groups after aggregation. HAVING cannot be used with DELETE, INSERT, or alone - it requires a SELECT query context.