Skip to content

Instantly share code, notes, and snippets.

@nicysneiros
Last active May 15, 2017 15:17
Show Gist options
  • Save nicysneiros/67c095895640ffe839f87ac8ddc82f89 to your computer and use it in GitHub Desktop.
Save nicysneiros/67c095895640ffe839f87ac8ddc82f89 to your computer and use it in GitHub Desktop.
MATCH (users) -[:LIKES]-> (:Page {name:"The Beatles"})
RETURN users
@jexp
Copy link

jexp commented Apr 20, 2017

@nicysneiros
This query is not correct, it misses the colon in front of :Page without the label it does a full database scan to find any nodes that have a "The Beatles" name.

Also do you have an constraint / index on :Page(name) ?

To make it the equivalent to the SQL query you would also need to change it to return:

RETURN users.name, users.gender, users.age

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment