2

I want to find out how many times the actor are acting together, for example both Keanu and Carrie act in matrix, when I count it, it shows up two times, one for keanu, Carrie, the other is carrier, keanu. How do I get rid of 1 of them. I have create the example here http://console.neo4j.org/r/9p5798

4

1 回答 1

2
START a=node(*), b=node(*) 
MATCH a-[:ACTED_IN]->(m)<-[:ACTED_IN]-b 
WHERE id(a)< id(b) 
RETURN a, b, count(m)
于 2013-10-24T00:21:28.727 回答