3.3 · Lesson

Averaging Values

This video was recorded using an earlier version of the sandbox (Neo4j 4.x). You are using a Neo4j 5.x sandbox for this course. The code example for durations has changed to add a WITH clause for sum() and avg().

Full definition for Cypher (opens in a new tab)Neo4j'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. avg() returns the average of all values retrieved during Full definition for aggregation (opens in a new tab)Grouping rows and computing a value over each group. In Cypher the grouping keys are whatever expressions in the same clause are not aggregated.. The values must be numeric types or durations. The result returned is a float.