thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Data & Analytics · Foundational

WHERE Clause

The clause that filters individual rows before grouping, keeping only those where the condition is true.

Definition

WHERE is applied to rows from FROM and JOIN before GROUP BY, so it cannot reference aggregate functions. It supports comparison, logical (AND, OR, NOT), LIKE, IN, BETWEEN and IS NULL predicates.

Example

SELECT * FROM Orders WHERE OrderDate >= '2026-01-01' AND Status = 'Shipped';

Exam tip

Filtering on an aggregate such as SUM(...) > 1000 requires HAVING, not WHERE.

Don't confuse it with

Related terms