In the Neo4j training course " Querying with Cypher in Neo4j 4.x, " Question 3 in the "Check Your Understanding" section asks "We want a query that returns the names of any people who both acted in and wrote the same movie. What query will retrieve this data?"
The only answer it takes as correct is
MATCH (p:Person)-[:ACTED_IN]→(m:Movie) WHERE (p)-[:WROTE]-(m) RETURN p.name, m.title
However, the last answer also seems to work, and I tested it to confirm:
MATCH (p:Person)-[:ACTED_IN]→(m:Movie)←[WROTE]-(p) RETURN p.name, m.title
Is there a reason that the second answer is not acceptable other than that it's just in the WHERE clause section of the course?
Solved! Go to Solution.