I trying to understand what is the difference between the following:
match (n:Crew)-[:KNOWS]-()
with n,collect(DISTINCT n) AS mygroup
match (m:Crew)
where not m in mygroup
return count(*)
and:
match (n:Crew)-[:KNOWS]-()
with collect(DISTINCT n) AS mygroup
match (m:Crew)
where not m in mygroup
return count(*)
What WITH pass in the first case and WITH pass in the second case? and how it affects about the answer.