Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想列出我参演的所有电影以及每部电影中的演员总和,但下面的查询只返回除我之外的演员总和,不会返回没有其他演员的电影。
start me=node({0}) match me-[:ACTS_IN]->movie<-[:ACTS_IN]-otherActors return movie, count(*) as actorSum
您需要将其与WITH. 您的查询的问题是您me在 的第一部分声明节点match,因此me永远不能在otherActors.
WITH
me
match
otherActors
start me=node({0}) match me-[:ACTS_IN]->movie with movie match movie<-[:ACTS_IN]-actors return movie, count(*) as actorSum