Reputation: 1028
I have this kind of relationship (:User)-[:COMMENTS]->(:Topic)
where :COMMENTS
has two properties (tweet
and sentiment
).
I would like to count and group the several different sentiment included in the relationships, like this kind of output:
How can I do this?
Thank you.
Upvotes: 2
Views: 612
Reputation: 1028
Solution found. The query needed is:
MATCH ()-[r:COMMENTS]->()
return count(r), r.sentiment
Upvotes: 2