Return nodes who are connected by a common set of nodes
问题 Is there a way in Neo4j, using either cypher or gremlin, to return a list of nodes that have a common set of nodes between them? An example would be Person1-[KNOWS]->Friend1 Person1-[KNOWS]->Friend2 Person1-[KNOWS]->Friend3 Person2-[HATES]->Friend2 Person2-[HATES]->Friend3 I want to start at Person1 and say, "Find me the people who hate all the people I know", which should return Person2 since Person1 knows Friend2,Friend3 and Person2 hates Friend2,Friend3 . I've started by finding the