Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-03-2019 08:18 AM
Is it possible to calculate a number of distinct elements of an array property per each node?
04-03-2019 08:32 AM
yes if you get the elements, then you can use count(distinct e)
for your example:
match (p:Person)
where p.id in ["1", "2"]
unwind p.embed as e
return p, count(distinct e)
or you can use size(apoc.coll.toSet(p.embed))
All the sessions of the conference are now available online