Aggregate with GroupBy SDN


(1708krishna) #1

Is there anyway with which we can fetch the aggregates(like count) grouped by some property of the node without writing custom-query in the code using SDN/OGM.

Any help is appreciated. Thanks in advance.

(Gerrit Meier) #3

Hi, since Cypher does not have any groupBy capability we do not offer anything out-of-the-box for grouping entities. The only, common way to achieve this is adding a count(<groupProperty>) to a custom query and parsing the result by yourself.
The data in the same "row" should get mapped by OGM in some form of collection if OGM knows about the domain classes you want to get.