Hello,
here is my code:
match (c:People)-[:LIKES]->(a:Object{objectName:'Skittles'})
WITH collect(c) as set1
match (d:People)-[: LIKES]->(a: Object{objectName:'Cheerios'})
WITH collect(d) as set2
RETURN apoc.coll.intersection(set1, set2) as set3
when I run this, it returns set1 is not found. But if I replace the last line with
RETURN apoc.coll.intersection(set2, set2) as set3
it works.
so, it seems that the first with is not passing set1 through.
Could anyone enlighten me with this issue?
ps:
my goal is to return people who both like Cheerios and Skittles. Any other way could get around with this issue could be fine.
Thanks in advance