Reputation: 231
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
Upvotes: 2
Views: 187
Reputation: 80176
START a=node(*), b=node(*)
MATCH a-[:ACTED_IN]->(m)<-[:ACTED_IN]-b
WHERE id(a)< id(b)
RETURN a, b, count(m)
Upvotes: 2