Graph Academy Quizzes

Hi,
I've just learned Neo4j and Cypher. In the Quizzes section of 'Advanced Queries'. Question 1: Suppose you want to add a WHERE clause at the end of this statement to filter the results retrieved.

MATCH (p:Person)-[rel]->(m:Movie)<-[:PRODUCED]-(:Person)

What variables, can you test in the WHERE clause:

Select the correct answers.

  • p
  • rel
  • m
  • PRODUCED

I think the answer is p and m but it responses incorrect answers.
So, Can Someone help me explain that?
Thanks

rel is also a valid answer since you traverse from Person to Movie via any relationship type. In contrast the inbound relationship is only using type :PRODUCED but does not assign a variable name to it.

1 Like

Thank you, I've passed the question :D