cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Exercise 3.2

In exercise 3.2, we have to retrieve all people who have written "other" movies, i.e movies other than one with the 'title' - Speed Racer

I'm trying something like

MATCH (p:Person)-[not :WROTE]->(:Movie {title:"Speed Racer"}) return p

but its not working. How do I get the desired result?

1 ACCEPTED SOLUTION

Hello @codeinode

You have to use a WHERE clause

MATCH (p:Person)-[:WROTE]->(m:Movie)
WHERE m.title <> "Speed Racer"
RETURN DISTINCT p

Regards,
Cobra

View solution in original post

2 REPLIES 2

Hello @codeinode

You have to use a WHERE clause

MATCH (p:Person)-[:WROTE]->(m:Movie)
WHERE m.title <> "Speed Racer"
RETURN DISTINCT p

Regards,
Cobra