Skip to content

Instantly share code, notes, and snippets.

@larsw
Created August 5, 2015 08:56
Show Gist options
  • Select an option

  • Save larsw/1171536acf6bfda3f01b to your computer and use it in GitHub Desktop.

Select an option

Save larsw/1171536acf6bfda3f01b to your computer and use it in GitHub Desktop.
Can this neo4j Cypher query for in & out (afferent & efferent) and combined degree be optimized/reduced?
START n = node(*)
RETURN n.name, length((n)-->()) AS efferent,
length((n)<--()) AS afferent,
length((n)-->()) + length((n)<--()) AS degree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment