The cool things you can do with 4.1's correlated subqueries (that previously required APOC)

Neo4j 4.1 is here, and with it, correlated subqueries, completing what we started in 4.0!

With correlated subqueries, we can call a subquery and pass it variables from the outer query. Subqueries are also executed per row, and this gives us some capabilities that previously required APOC procs.

We've updated some of our knowledge base articles to cover how you can tackle the following use cases with 4.1's correlated subqueries:

Post-UNION processing!

Limiting MATCH results per row!

Conditional Cypher execution!


Also here is my blog post + video on the topic

1 Like