This repository was archived by the owner on Oct 10, 2025. It is now read-only.
how to use subquery #5574
-
|
is any way count with distinct in subquery? MATCH (a:Account)-[cw:ContactWith]-()
WITH a, { MATCH (a)-[:ContactWith]-(f:Account) RETURN COUNT(DISTINCT f) } AS f_count, { MATCH (a)-[:ContactWith]-(g:`Group`) RETURN COUNT(DISTINCT g) } AS g_count
RETURN a, f_count, g_count |
Beta Was this translation helpful? Give feedback.
Answered by
andyfengHKU
Jun 24, 2025
Replies: 1 comment 1 reply
-
|
Hi @Anwenya, We don't yet support distinct aggregate within subquery. Regarding the semantic of Are you trying to count the distinct account for each |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
prrao87
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @Anwenya,
We don't yet support distinct aggregate within subquery. Regarding the semantic of
Are you trying to count the distinct account for each
a? If so, I wonder if the following will work