Comparison Operators
Description
The comparison operators: =
(equal), !=
or <>
(not equal), <
(less than), <=
(less than or equal), >
(greater than) and >=
(greater than or equal) can be used to formulate conditions.
They are all binary operators, meaning they must be used with both a left-hand side and a right-hand side argument.
Supported types
The operators can be applied to any data type, with the following limitations:
DATE column: Can only be compared to another DATE column or a DATE constant.
FLOAT column: Can be compared to a column or a constant of either type FLOAT or INT.
INT column: Can be compared to a column or a constant of either type FLOAT or INT.
STRING column: Can only be compared to another STRING column or a STRING constant.
Usage
Comparison operators can be used in the following contexts:
CASE WHEN (in the
WHEN
conditions)Pull-Up-Functions (in the filter argument)
BIND_FILTERS (in the filter argument)
CALC_REWORK (in the filter argument)
NULL handling
If one of the input values is NULL, the result is NULL as well.
The order of precedence for comparison operators is described in the Functions and Operators section.