Created
March 12, 2021 09:40
-
-
Save angrykoala/51b683cf200f7cf5c72dcd4bc88f302d to your computer and use it in GitHub Desktop.
A cheatsheet for Neo4j cypher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// 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