Hi
With this query I'm getting this error
MATCH (o:Order)-[cont:CONTAINS]->(p:Product)-[r:PART_OF]->(c:Category)
where EXISTS {
(MATCH (:Supplier)-[:SUPPLIES]->(p))}
RETURN p.productName,cont.unitPrice;
Neo.ClientError.Statement.SyntaxError
Neo.ClientError.Statement.SyntaxError: Invalid input ':': expected whitespace, DISTINCT, an expression or ')' (line 3, column 9 (offset: 94))
" MATCH (:Supplier)-[:SUPPLIES]->(p))"
^
It's the extra set of ( ) inside of the EXISTS that is causing an error. The open parenthesis (introduces an expression but MATCH is a clause.
Instead, try:
MATCH (o:Order)-[cont:CONTAINS]->(p:Product)-[r:PART_OF]->(c:Category)
where EXISTS {
MATCH (:Supplier)-[:SUPPLIES]->(p)
}
RETURN p.productName,cont.unitPrice