You should read the documentation for
Here are a couple of snippets from the docs:
Most procedures return a stream of records with a fixed set of result fields, similar to how running a Cypher query returns a stream of records. The
YIELDsub-clause is used to explicitly select which of the available result fields are returned as newly-bound variables from the procedure call to the user or for further processing by the remaining query. Thus, in order to be able to use
YIELD, the names (and types) of the output parameters need be known in advance. Each yielded result field may optionally be renamed using aliasing (i.e. resultFieldName
ASnewName). All new variables bound by a procedure call are added to the set of variables already bound in the current scope. It is an error if a procedure call tries to rebind a previously bound variable (i.e. a procedure call cannot shadow a variable that was previously bound in the current scope).
Inside a larger query, the records returned from a procedure call with an explicit YIELD may be further filtered using a
WHEREsub-clause followed by a predicate (similar to
If the called procedure declares at least one result field,
YIELDmay generally not be omitted. However
YIELDmay always be omitted in a standalone procedure call. In this case, all result fields are yielded as newly-bound variables from the procedure call to the user.
CLICK HERE to find out more related problems solutions.