Here is my query:
MATCH (a:Person)-[:Sent]->(m2:message)-[r:forward]->(m1:message)<-[Sent]-(b:Person)
WITH a, b, COUNT(r) as count
RETURN a,b,count
Here is the result sample:
a b count
name1 name2 2
name2 name1 3
and I want to get the sum of forwarded messages between the 2 nodes in both direction, therefore I don't want to have duplicated results like on the previous example
For the previous example I want such kind of results:
a b count
name1 name2 5
I tried many queries but couldn't find any solution or syntax to get this results.
Is there any way to get this kind of results? Thank you in advance for your time.