簡體   English   中英

在 Memgraph 的聚合函數中使用 DISTINC?

[英]Using DISTINC within aggregate functions in Memgraph?

有沒有辦法讓我簡化以下代碼: WITH DISTINCT n.prop as distinct_prop RETURN COUNT(distinct_prop)

如您所見,我使用了具有不同值的聚合 function。 我能以某種方式“跳過” WITH子句嗎? 它看起來有點多余,但沒有它代碼就無法工作。

使用聚合函數,您可以使用 DISTINCT,因此 RETURN COUNT(DISTINCT n.prop) 在此處查看文檔 -> https://memgraph.com/docs/cypher-manual/clauses/return#10-returning-unique-results

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM