1.3 · Lesson

Using Aggregation to Count

With the 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. count() function, you can perform a count of Full definition for property (opens in a new tab)A named value stored on a node or a relationship., Full definition for node (opens in a new tab)A vertex in a graph. In a property graph it can carry labels and properties., Full definition for relationship (opens in a new tab)A named, directed connection between two nodes. Every relationship has a type, a start node and an end node., paths, or rows during query processing. When you aggregate in a Cypher statement, the query must process all Full definition for pattern (opens in a new tab)A graph structure written in Cypher, such as a node joined to another node by a relationship. in the MATCH clause to complete the 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. to either return results or perform the next part of the query.

Here is an example: