We're pretty new to cypher, though we've done some training and use neo4j 
pretty regularly. A lot of queries have come very easily! 

This week we realized we needed to focus on organizations in our graph that 
were connected to a few specified organizations and no others. This helps 
us suss out dependencies and focus on groups for beta tests as we role out 
product features (but I digress). We couldn't really come up with anything 
we liked and thought we'd post to the forum. 

Example pseudo-data:

(o1:org) -[r:orders_from]-> (oa:org)

(o1:org) -[r:orders_from]-> (ob:org)
(o2:org) -[r:orders_from]-> (ob:org)

(o1:org) -[r:orders_from]-> (oc:org)
(o2:org) -[r:orders_from]-> (oc:org)
(o3:org) -[r:orders_from]-> (oc:org)

We want a query that, given:

o1:org
o2:org

Will include: 

(ob:org) 

But exclude 

(oa:org),(oc:org) 

Because each member of the set does not orders_from them, or because 
someone outside the set orders_from them (o3:org).

We were able to solve the problem, but we are sure our query is way to ugly 
to be the best way in cypher. So what do you think cypher community?



-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to