Skip to content

Instantly share code, notes, and snippets.

@wmfairuz
Created April 4, 2014 09:08
Show Gist options
  • Save wmfairuz/9970927 to your computer and use it in GitHub Desktop.
Save wmfairuz/9970927 to your computer and use it in GitHub Desktop.
Some Neo4j examples
START downstream = node:classes(name = "MDF")
MATCH downstream<-[:INSTANCE_OF]-instance
RETURN distinct instance SKIP 0 LIMIT 20
START n = node:classes(name = "MDF")
MATCH n<-[:INSTANCE_OF]-instance
WHERE instance.name =~ ".*AL.*"
RETURN distinct instance
SKIP 0 LIMIT 20
START startingPoint = node(22429)
MATCH startingPoint<-[:CHILD_OF*3]-instance
WHERE instance.name! = "16-ASLC"
RETURN distinct instance
SKIP 0 LIMIT 20
START startingPoint = node(22429)
, state = node(1477)
MATCH startingPoint<-[:CHILD_OF*3]-instance
WHERE
instance.name! = "16-ASLC"
AND instance-[:RELATED_TO]->state
RETURN distinct instance
SKIP 0 LIMIT 20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment