The "REFERENCE" operand always evaluates to the identifier of the referenced nodes in one or all of the REFERENCE properties. Thus, all of the REFERENCE operands should be used with a StaticOperand that also evaluates to identifiers.
The "REFERENCE()" operand (with no selector name and no property name) evaluates to the identifiers of the nodes referenced by all of reference properties on the node in the only selector. The "REFERENCE(selectorName)" works the same way, but must be used if there is more than one selector in the query. Finally, the "REFERENCE(selectorName.propertyName)" evaluates to the identifiers of nodes referenced by the "propertyName" reference property on the nodes in the named selector.
For example, here is a query that finds all nodes that reference a set of nodes for which we already know the identifiers, "id1", "id2", and "id3".