Skip to content

Instantly share code, notes, and snippets.

@angrykoala
Created March 12, 2021 09:40
Show Gist options
  • Save angrykoala/51b683cf200f7cf5c72dcd4bc88f302d to your computer and use it in GitHub Desktop.
Save angrykoala/51b683cf200f7cf5c72dcd4bc88f302d to your computer and use it in GitHub Desktop.
A cheatsheet for Neo4j cypher
/// QUERIES
// Get all nodes
MATCH(n)
RETURN n
// Get all nodes with label
MATCH(m:Movie)
RETURN m
/// CREATE
// Create node
CREATE (my_movie:Movie { name: 'My Super Duper Movie', rating: 2.3})
// Create relation
MATCH (me:Author {name: 'angrykoala'})
MATCH (movie:Movie {name: 'My Super Duper Movie'})
CREATE (movie) - [:CREATED_BY] -> (me)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment