cancel
Showing results for 
Search instead for 
Did you mean: 

Aggregate with GroupBy SDN

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.

1 REPLY 1

gerrit_meier
Neo4j
Neo4j

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.

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.