I am trying to figure out insights where (node1)-[:related_to]->(node2)-[:belongs_to]->(node3)
. I want to display like (node1)-[:belongs_to]->(node3)
based on above relationship. Three relationship was created.
MATCH (n2:node2),(n3:node3)
WHERE n2.Name = n3.Name
CREATE (n3) <- [:BELONGS_TO]- (n2)
MATCH (n1:node2),(n2:node2)
CREATE (n1) <- [:related_to]- (n2)
MATCH (n1:node2),(n2:node2)
CREATE (n2) <- [:related_to]- (n1)
I have tried this query but it's giving me via relationship.
MATCH (n1:node1)-[r1:related_to]-(n2:node2)-[r2:BELONGS_TO]-(n3:node3)
RETURN n1,n2,n3
I am new in this field and trying to bring few insights. Your valuable feedback will be appreciated.