Grapphus
(Marcus Steeds)
1
In the Cypher fundamentals course, (https://graphacademy.neo4j.com/courses/cypher-fundamentals/1-reading/3-relationships/)) the second question of that page, asks "Which MATCH
clauses will return the names of the directors of the movie, The Matrix?" and says that the following is the *wrong* answer:
MATCH (m:Movie {title: 'The Matrix'})<-[:DIRECTED]-(p:Person) RETURN p.name
This seems to be eminently correct. Why is it considered wrong by the training algorithm? What am I missing here?
There are 2 correct answers:
correct; MATCH (m:Movie {title: 'The Matrix'})<-[:DIRECTED]-(p:Person) RETURN p.name
incorrect: `MATCH (m:Movie {title: 'The Matrix'})--(p:Person) RETURN p.name
There could be ACTED_IN, WROTE, DIRECTED, PRODUCED, REVIEWED relationships between a Person node and a Movie node.
correct: MATCH (m:Movie {title: 'The Matrix'})<-[:DIRECTED]-(p) RETURN p.name
incorrect: `MATCH (m:Movie {title: 'The Matrix'})--(p:Director) RETURN p.name
There is no such node label, Director in the graph.