Comparison Operators and Functions

Use these comparison operators in your queries.

OperatorDescription
<Less than
>Greater than
<=Less than or equal to
>=Greater than or equal to
=Equal
<>Not equal
!=Not equal

Use these comparison functions in your queries.

FunctionReturn TypeInput ArgumentsDescription
greatest({v1}, {v2}, ..., {vN})Same as inputAny supported data typeReturns the largest of the provided values.
least({v1}, {v2}, ..., {vN})Same as inputAny supported data typeReturns the smallest of the provided values.

These data types are supported with the comparison operators and functions: DOUBLE, BIGINT, VARCHAR, TIMESTAMP, TIMESTAMP WITH TIME ZONE, and DATE.