Skip to main content
WHERE keeps only the rows that match your conditions, before any grouping or totalling. A condition compares a field with a value. Chain conditions with AND and OR.
WHERE filters on dimensions, not metrics. To keep only the groups whose totals match, use HAVING.

Operators

Text values go in single quotes, lists in brackets:
Which operators a field takes depends on its type: text, numbers, dates or yes/no. The editor only suggests the ones that fit.

Dates

Date fields take dates written as 2026-01-31, or the relative dates from SINCE and UNTIL, like -30d and today.

Grouping conditions

AND is worked out before OR. Use brackets when you mix them:
You can also compare one field with another of the same type, such as product_variant_price < product_variant_compare_at_price.