Neo4j COUNT() Function

In Neo4j database, COUNT() function is used to count the number of rows.

Syntax:

Example:

Use the following query to demonstrate the usage of COUNT() function. It will count the numbers when India is winner.

Output:

Neo4j Count function 1

Group COUNT

You can also use COUNT() function to count the groups of relationship types.

Example:

The following query counts and returns the number of nodes participating in each relation.

Neo4j Count function 2




Latest Courses