Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-05-2022 04:31 AM
Hello,
I have a simple query like this :
MATCH (n:application) RETURN n
and with a parameter 'app' in the node, so with this query for each application i have like 2 nodes with different ids but with the same parameter 'app'.
What i want is to get all applications nodes with distinct on 'app' param, in the case that i have two nodes i want one of them not the 2 returned.
Thank you,
05-05-2022 06:12 AM
you can try the following. It will query for all Application nodes, groups them by n.app values, then return only one node for each distinct value of n.app
MATCH (n:application)
with n.app, collect(n) as nodes
return n.app, nodes[0]
All the sessions of the conference are now available online