Last active
July 10, 2018 15:59
-
-
Save CliffordAnderson/8e2fb338cdb90994b0a4 to your computer and use it in GitHub Desktop.
A Cypher examples to unwind and collect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
match (a {name:"Daniel"}), (b {name:"Jerry"}) | |
with a,b | |
match s = shortestPath(a-[]-b) | |
unwind nodes(s) as n | |
with collect(n) as m | |
return head(m) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
match (a {name:"Daniel"}), (b {name:"Jerry"}) | |
with a,b | |
match s = shortestPath(a-[]-b) | |
unwind nodes(s) as n | |
return n.name as Names |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment