The SELECT function combines, filters, and transforms
complex message and database data.
Any expressions in these paths can use any of the broker's operators and functions in any combination. The expressions can refer to the tables’ columns, message fields, correlation names declared by containing SELECTs, and any declared variables or constants.
If it can, it is given to the database. In order to be evaluated by the database, it must use only those functions and operators supported by the database.
It can, however, still refer to message fields, correlation names declared by containing SELECTs, and any other declared variables or constants within scope.
It then attempts to give the database those sub-expressions that it can evaluate, leaving the broker to evaluate the rest.