diff --git a/pages/querying/expressions.mdx b/pages/querying/expressions.mdx index ea60b6d11..c9614f5db 100644 --- a/pages/querying/expressions.mdx +++ b/pages/querying/expressions.mdx @@ -243,6 +243,10 @@ RETURN actor.name, years, titles; ``` The whole predicate, including the `WHERE` keyword, is optional and may be omitted. +Pattern comprehensions can be nested, for example `[(n)-->(m) | [(m)-->(x) | x.id]]` returns a list of lists. + +You can also bind the matched path to a variable using the syntax `[path = (a)-[r]->(b) | length(path)]`. + ### Pattern comprehension in `WHERE` clause Pattern comprehension can also be combined with comprehension constructs inside the `WHERE` clause.