Skip to main content
SQL-BASICS5 MIN READ

Row Filter or Group Filter?

Distinguish row-level predicates from aggregate-level predicates.

Sort these predicates by when SQL can evaluate them. WHERE: row-level predicate HAVING: group-level predicate status = 'completed' created_at >= DATE '2026-06-01' country = 'United States' customer_id IS NOT NULL COUNT(*) >= 50 SUM(net_revenue) > 10000 AVG(rating) < 4.2 COUNT(DISTINCT user_id) >= 1000

Read the full lesson

Sign up free — one personalized lesson every day, matched to your role and goals.

Already have an account? Sign in

← Back to library
Contact us