CALL Subquery Clause
Overview
The CALL subquery clause allows you to execute a subquery within a larger Cypher query and import specific variables from the parent query’s results.
Syntax
CALL (<variable_list>) {
<QUERY>
}
<variable_list>
: Comma-separated list of variables to import from the subquery<QUERY>
: The subquery to execute
Examples
MATCH (a:Person{col2: "Dan"})-[r:Knows]->(b)
CALL (a, b) {
MATCH (a:Person)-[:Knows]->(c)
RETURN c
}
RETURN a{.*}, b{.*}, c{.*} ORDER BY a, b, c
Last updated on