Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.
Discussion options

You must be logged in to vote

Hi @Anwenya,

We don't yet support distinct aggregate within subquery. Regarding the semantic of

WITH a,  { MATCH (a)-[:ContactWith]-(f:Account) RETURN COUNT(DISTINCT f) } AS f_count

Are you trying to count the distinct account for each a? If so, I wonder if the following will work

MATCH (a:Account)-[cw:ContactWith]-()                                                                 
WITH a
MATCH (a)-[:ContactWith]-(f:Account) 
RETURN a, COUNT(DISTINCT f) AS f_count

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Anwenya
Comment options

Answer selected by prrao87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants