ERFAKLK
ERFAKLK

Reputation: 35

Cannot run Cypher query

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”"

Upvotes: 0

Views: 48

Answers (2)

Parth
Parth

Reputation: 31

Try using single quotes

MATCH (p:Student)-[:Study]->(s:Subject)
WHERE p.age > 22 AND s.name = 'Databases' 
RETURN p

Upvotes: 0

fbiville
fbiville

Reputation: 8970

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

Upvotes: 1

Related Questions