Try this:
// find all the questions that were answered.....
match (q:Question)-[]->(r:Response)
with q, r
//find count of answered questions per each responder.....
match (u:Responder)-[]->(r)-[]-(q)
return u.name as usr, count(q) as cnt
Yes @alexandra I did try count(rw).
The issue with that is that it gives the count as 2 in the case mentioned above.
I want to consider the response only once to get the correct number of questions answered
Thanks for your response.
I need optional match because i want to get the total questions as well.
I am hoping to get :
total questions : 10
responded : 4
Try this:
// find all the questions that were answered.....
match (q:Question)-[]->(r:Response)
with q, r
//find count of answered questions per each responder.....
match (u:Responder)-[]->(r)-[]-(q)
//find total questions....
match (q1:Questions)
with count(q1) as TotCnt
return u.name as usr, count(q) as cnt, TotCnt