I can’t understand this example from the doc:
START david=node(1)
MATCH david--otherPerson-->()
WITH otherPerson, count(*) as foaf
WHERE foaf > 1
RETURN otherPerson
What does otherPerson and count(*) do in the WITH line?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
what you see here are two queries joined by with.
With acts as a return for the first query and as “start” of the second one.
It set’s the part of the context that is passed on.
and then do the filtering in your calling code.
with with you can just start the next query directly in cypher, which can only see what is declared in the with section,
in this case: otherPerson and foaf the other identifiers and data of the first query are no longer available.