
[英]Calculate total count of two nodes and number of relations between them in single query using cypher - neo4j
[英]How to count the total number of relations in neo4j?
我正在尝试以下查询,
start n=node(*) match (n)-[r]->(m) return count(r)
我不确定这个查询是否正常。
您应该使用此查询: MATCH ()-[r]->() RETURN count(*)
干杯。
PS: start, match
查询表单应仅用于旧版索引。
尝试此查询来计算关系数量:
MATCH ()-[r:NAME_OF_RELATIONSHIP]->() RETURN count(r)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.