I have to do that:Find the students who are over 22 years old and are studying Databases. Expected result:
MATCH (p:Student)-[:Study]->(s:Subject)
WHERE p.age > 22 AND s.name = “Databases”
RETURN p
Invalid input '“': expected whitespace, comment or an expression (line 2, column 31 (offset: 70))
"WHERE p.age > 22 AND s.name = “Databases”"
You are using the wrong double quotes (“ instead of "). The query should be:
MATCH (p:Student)-[:Study]->(s:Subject)
WHERE p.age > 22 AND s.name = "Databases"
RETURN p
Try using single quotes
MATCH (p:Student)-[:Study]->(s:Subject)
WHERE p.age > 22 AND s.name = 'Databases'
RETURN p
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.