Count your Nodes and Relationships
How many Nodes and relationships are in your Graph?
You could look on the left hand side of the Neo4j Browser, but that would be cheating.
For nodes:
MATCH (n) RETURN count(n)
For Relationships:
MATCH ()-[r]->() RETURN count(r)
The above CYPHER statements assume all nodes and relationships are to be counted. Once you start adding in labels and relationships you will filter the return values
For Outgoing Relationships:
MATCH (a)-[r]->() RETURN count(a)
This counts nodes with outgoing relationships only.
Comments
Post a Comment