cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Simple question on how to return aggregations

Neo4j Community server 4.3.3 on Ubuntu 20.04

A have a question I wasn't able to resolve:

Imagine to have a query like this:

MATCH (a:A)-[:REL]->(b:B)
     WHERE b.uuid in ['u1','u2',...,'un']

RETURN a,b   ORDER BY b.uuid

Well, the question is:

How is possible to return an array, where each element contains all the occurrences of a and b with the same b.uuid?

1 ACCEPTED SOLUTION

Hey there,

It looks like you're looking for the COLLECT() function to create an aggregated list.

Although I'm not sure what you are intending the final list to contain. Could you provide an example of what you're trying to return?

View solution in original post

2 REPLIES 2

Hey there,

It looks like you're looking for the COLLECT() function to create an aggregated list.

Although I'm not sure what you are intending the final list to contain. Could you provide an example of what you're trying to return?

TY - Sometimes, as in this case, I feel a little bit stupid 😉