I started using neo4j recently.I have a scenario like
Match (a:parent)-[r:father_of]->(b:daughter)-[r1:friend_of{talks_to:5 times}]->(c:daughter)-[r2:daughter_of]->(d:parent)
Now I want to marge all these nodes to one if talks_to property of r1 relationship is more that 2 times.Or create one master node to all these, like all these belong to that family if it meets given condition.How this can be done
See above is my data set.Now I want to merge a,d,g nodes because their talks_to is more than 2 and n should be seperate node because g -> n talks_to is less than 2