这是我正在尝试的:
match
(e:Person) - [r] - (f:Person)
where (count(r) > 5 AND count (r) <10)
return id(e), e.name;
Run Code Online (Sandbox Code Playgroud)
我懂了
QueryExecutionKernelException: Invalid use of aggregating function count(...) in this context
Run Code Online (Sandbox Code Playgroud)
基本上,我想找到一个与5至10个其他人相关的人。
找出彼此之间的联系不仅仅是通过关系,例如:
使用
match (a:Person)-[r]-(b:person)
with a,b,count(r) as cnt
where cnt > 5 and cnt < 10
return *
Run Code Online (Sandbox Code Playgroud)
但是,如果您要查找以链状关系联系的人(朋友的朋友)
而您想找到一个到d,则可以使用类似
MATCH (n:Person)-[r*1..3]->(m:Person)
RETURN *
Run Code Online (Sandbox Code Playgroud)
相关教程希尔
| 归档时间: |
|
| 查看次数: |
4262 次 |
| 最近记录: |