0

Running this query in cypher

MATCH (v:Person)<--(a:Place)<--(s:Thing) WHERE count(s)>0 RETURN v

Getting this Error Message:

Can't use aggregate functions in the WHERE clause.

Obviously it doesn't like filtering on the count aggregate function. What is a good work around for this? Thanks!

4

1 回答 1

2

你们几乎都在评论中。

MATCH (v:Person)<--(a:Place)<--(s:Thing) 
RETURN count(s) as count, v

如果这是为所有内容返回 1 个计数的原因,那么您确定每人拥有不止一件东西吗?您无需检查计数是否 > 0,因为这是隐含的。

于 2013-07-16T14:40:53.923 回答