October 2017
Beginner to intermediate
316 pages
8h
English
Assuming that you have tried all the previous queries, you have several homonyms in your base:
MATCH (n:Person) WHERE n.name="Juliet" or n.firstName="Juliet" RETURN n;
The important keywords are MATCH and RETURN. This queries the database for nodes with the Person label; we also see a condition on the name property.
Another, richer example of the READ query is as follows:
MATCH (n:Person)-[:LOVES]-()WHERE toLower(n.name)="juliet"RETURN n ORDER BY n.age ASCSKIP 2 LIMIT 5 ;
Here, we modified the condition with a conversion to lowercase in the condition; there is a sort occurring on the age (from lowest to highest) and nodes without an age property will be at the end of the list. SKIP and LIMIT are used to paginate the results.
Read now
Unlock full access