如何统计neo4j中关系的总数?

Har*_*rma 3 neo4j graph-databases cypher

我正在尝试以下查询,

start n=node(*) match (n)-[r]->(m) return count(r)

我不确定这个查询是否正确。

log*_*ima 5

您应该使用此查询:MATCH ()-[r]->() RETURN count(*)

干杯。

PS:start, match查询形式只能用于遗留索引。