我需要在Neo4j上的Cypher中对聚合进行聚合;
match (
match (w:words)
return distinct k.word as word, count(w) as count, count(distinct w.id) as id
) as a
return distinct id, count(word), sum(count);
这可能,谷歌建议不是吗?
答案 0 :(得分:0)
使用with
尝试这样的事情:
match (w:words)
with distinct w.word as word, count(w) as count, count(distinct w.id) as id
return distinct id, count(word), sum(count);