Hi all!
New to neo4j and learning cypher... Still very fresh, and my use of nomenclature is going to be rough, but I'm hoping someone may be able to help me out with doing the following:
I'm trying to get all nodes that have edges to two nodes of the same label that contain two different properties.
Effectively, I'm trying to figure out if there's a way to perform an AND operation on the properties contained within the two nodes connected to the target node.
e.g. something like this, but obv this is not going to work
MATCH (c: Child)
WHERE (c: Child)-{:Has}-(Parent{name: "Bob"} and Parent{name:"Susan"})
RETURN c
I'm hoping there's a really easy inline way of doing this, because I realize that what I'm trying to do with AND requires evaluating a set of at least 2 Parent entities, and the above syntax is only looking at one Parent at a time.
I've tried using the collect() method to aggregate all results containing bob, and susan, but I don't know how to use the syntax to get an intersection between the two.
Any help would be greatly appreciated, thanks!