Skip to content

Instantly share code, notes, and snippets.

@narutaro
Last active February 9, 2016 23:46
Show Gist options
  • Save narutaro/92cef3e9e64d055757b4 to your computer and use it in GitHub Desktop.
Save narutaro/92cef3e9e64d055757b4 to your computer and use it in GitHub Desktop.
Cypher I have written

Cypher I have written

Two common connections

match (l {name: '54.230.141.207'})<-[r1]-(n)-[r]->(m {name: '184.25.56.107'}) return l, r1, n, r, m;
match (l {name: '54.230.141.207'})<-[r1]-(n)-[r]->(m {name: '54.230.141.216'}) return n;
match (l {name: '54.230.141.207'})<-[r1]-(n)-[r]->(m {name: '54.230.141.216'}) return n.name;

Search by a property

match (n {_type: 'c2'}) return n;

Count

match (n {_type: 'c2'}) return count(n);

Connection towards c2

match (n)-[r]->(m) where m._type = 'c2' return n, r, m;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment