Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-12-2021 06:04 PM
Hello, so i am trying to return a data of 3 organisations where the 1st owns 2nd organization, which owns 3th organization. Of course, it could return f.e 4 organisations, 5 etc.. but firstly I am sticking to 3th.
Both my approaches don't work.
Firstly i tried to do it like that:
MATCH(n:Organization)-[:OWNS]->(n1:Organization)-[:OWNS]->(n2:Organization) RETURN n, n1, n2
But it seems to return first org, second org and then skips all the orgs which where between n1 and n2 and pass the last one i guess. And also it would be bad if for example i would like to return 10 of this orgs.
trying with that:
MATCH(n:Organization)-[:OWNS*3]->(n1:Organization) RETURN n, n1
also seems bad.
Does anyone have an idea?
12-14-2021 02:57 AM
Hello @amf3tam1nkapvp and welcome to the Neo4j community
Please avoid creating multiple topics for the same issue. I answered here.
Regards,
Cobra
All the sessions of the conference are now available online