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:
Dates
Date fields take dates written as2026-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:
product_variant_price < product_variant_compare_at_price.
