2.3 · Lesson

Aggregating across rows

CypherNeo4j's implementation of GQL, the ISO standard query language for graph databases. It is declarative: you describe the pattern to find, and the database decides how to find it. has built-in aggregations such as count(), avg() and collect(). They take many rows and return one value. When none of them does what you need, you can write your own.

An aggregation function is called once per input row, and produces a single result when the rows run out. This query returns one headline per stock: