I'm new to neo4j so I'm probably making some kind of basic mistake here:
This is a subset of my graph:
I have 3 kinds of nodes:
- (blue) attribute
- (red) business
- (yellow) promotion
attributes can have relationships to promotions and businesses (:TAGS)
This is my best guess cypher query so far.
MATCH(a:Attribute)--(b:Business)--(p:Promotion)
WHERE a.name IN ["business", "casual", "happy_hour"]
RETURN a, b, p
UNION
MATCH(a:Attribute)--(p:Promotion)--(b:Business)
WHERE a.name IN ["business", "casual", "happy_hour"]
RETURN a, b, p;
This isn't quite what I'm looking, it returns promotions related to one or more attributes
I want to only return promotions that have relationships to all attributes in a given set of attributes. How should I do this?
