I'm trying to make some kind of "left join" via Cypher query, but don't know how.
I have two types of Nodes: ACityRep and SourceNode. Via hash-Value (unique ID), I have to find the source node, find the child element and afterwards the hash-value of this child node.
Cypher queries that I want to join:
- Finding source node via hash value. Returns source node.
MATCH (a:ACityRep)-[r:SOURCE]->(s:Elements)
WHERE a.hash = "ID_fe2ceb4d-d203-4f70-ade7-bbcae09aa1fc"
RETURN s
- Finding child elements for our source node via property "container_id", which points to our source node.
MATCH (n:Elements)
WHERE n.container_id = "122"
RETURN n LIMIT 1
- Finding the hash value for our aquired child node
MATCH (a:ACityRep)-[r:SOURCE]->(n:Elements)
WHERE n.element_id = "121"
RETURN a.hash
Thanks in advance!