Skip to main content
Version: 5.x

Operator priority

When evaluating an expression, operators are evaluated in a specific order depending on operator priority. The higher the operator’s priority, the earlier it will be executed. The table below lists the priorities of all operators in descending order.

OperatorDescriptionType
(expression)
JOIN
CASE, MULTI, OVERRIDE, EXCLUSIVE, IF ... THEN
PARTITION
RECURSION
GROUP
STRUCT
MAX/MIN
ROUND
CONCAT
INTEGER, DOUBLE...
PREV, CHANGED, ...
ISCLASS
ACTIVE
literal
Expression in parentheses
Composition
Selection
Partition/order
Recursion
Group
Structure creation
Maximum/minimum
Rounding
String concatenation
Type conversion
Previous value, Change operators
Signature matching
Activity
Constants

Prefix
Prefix
Prefix
Prefix
Prefix
Prefix
Prefix
Prefix
Prefix
Prefix
Prefix
Prefix
Prefix

[ ]
IS
AS
Structure element access
Classification
Classification
Postfix
Postfix
Postfix
-Unary minusPrefix
*
/
Multiplication
Division
Binary
Binary
+
-
Addition
Subtraction
Binary
Binary
(+)
(-)
Addition with NULL values
Subtraction with NULL values
Binary
Binary
LIKEComparison with a patternBinary
<
<=
>
>=
Less
Less or equal
Greater
Greater or equal
Binary
Binary
Binary
Binary
==
!=
Equal
Not equal
Binary
Binary
NOTLogical negationPrefix
ANDLogical ANDBinary
XORLogical exclusive ORBinary
ORLogical ORBinary
IFConditionBinary