Skip to content

Instantly share code, notes, and snippets.

@CliffordAnderson
Last active July 10, 2018 15:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save CliffordAnderson/8e2fb338cdb90994b0a4 to your computer and use it in GitHub Desktop.
Save CliffordAnderson/8e2fb338cdb90994b0a4 to your computer and use it in GitHub Desktop.
A Cypher examples to unwind and collect
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)
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