Neo4j – Aggregation Function

  • Post author:
  • Post category:Neo4j
  • Post comments:0 Comments

Like SQL, Neo4j CQL has provided some aggregation functions to use in the RETURN clause. It is similar to the GROUP BY clause in SQL.

We can use these RETURN + Aggregation Functions in the MATCH command to work on a group of nodes and return some aggregated value.

AGGREGATION Functions List

Following is the list of aggregation functions in Neo4j.

Sr.NoFunction & Description
1COUNT It returns the number of rows returned by the MATCH command.
2MAX It returns the maximum value from a set of rows returned by the MATCH command.
3MIN It returns the minimum value from a set of rows returned by the MATCH command.
4SUM It returns the summation value of all rows returned by the MATCH command.
5AVG It returns the average value of all rows returned by the MATCH command.

Leave a Reply