Reputation: 104
please I want to get the count of relationships (no_of_relationships) connected to each node in a path.
MATCH (parent:Members {id:"1", position:"R"})-[:PARENT_OF]->(child)
WHERE no_of_relationship < 1
So, I want to get all the nodes in this path where no_of_relationship is < 1
My question is how do I get no_of_relationship
Thanks guys.
Upvotes: 0
Views: 610
Reputation: 104
I found a solution to my problem
MATCH (parent:Members {id:"1"})-[:PARENT_OF*1..]->(c)
WITH c as result
WHERE size((result)-->()) < 2
RETURN result.id, size((result)-->()) as no_of_relationship LIMIT 50
Thanks guys.
Upvotes: 1