Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
07-19-2022 02:20 PM
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?
07-19-2022 02:50 PM
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.
All the sessions of the conference are now available online