I am a newbie in Cypher. I am trying to find a query which will returns nodes having more than one relationship to other nodes. Please refer to http://neo4j.com/docs/snapshot/images/cypher-match-graph.svg for the structure. I am trying to find the person who has acted in some movie(s) and also a father. When I am running below query, it is giving me 0 records:
START n=node(*)
MATCH (n)-[r]->()
WHERE type(r)="ACTED_IN" AND type(r)="FATHER"
RETURN n,count(n);
However, when I am running below query, it does return data but that I think is not what I wanted:
START n=node(*)
MATCH (n)-[r]->()
WHERE type(r)="ACTED_IN" OR type(r)="FATHER"
RETURN n,count(n);
So basically, I need a query which will fetch only Charlie Sheen since he acted in Wall Street movie and also father of Martin Sheen
I have tried to follow what others are saying in Cypher query to find nodes that have 3 relationships or How to retrieve the nodes with multiple relationships using cypher query or Cypher query to find nodes that have 3 relationships but not able to fathom the trick :(
Any help will be of much appreciation !