Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-02-2022 01:16 AM
I have a graph where each node contains two property A and B. I wanted to check e.g., if the same B value exist in other nodes (appear in the data more than one time). So far I succeed to find the occurrence of the property B value when its more than once in the data.
here is my code:
MATCH (n:data)
WITH n.b as b, COUNT(n) as count
WHERE count>1
RETURN b, count
However, I want also to return a for each b that appears more than one time
Solved! Go to Solution.
03-02-2022 02:08 AM
Hi @starz10de ,
Something like this should work
MATCH (n:data)
WITH n.b as b, collect(n) as li
WITH b, li
WHERE size(li)>1
RETURN b, li
Bennu
03-02-2022 02:08 AM
Hi @starz10de ,
Something like this should work
MATCH (n:data)
WITH n.b as b, collect(n) as li
WITH b, li
WHERE size(li)>1
RETURN b, li
Bennu
03-02-2022 02:14 AM
Thanks a lot, it works
All the sessions of the conference are now available online