Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-04-2020 05:01 AM
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:
MATCH (a:ACityRep)-[r:SOURCE]->(s:Elements)
WHERE a.hash = "ID_fe2ceb4d-d203-4f70-ade7-bbcae09aa1fc"
RETURN s
MATCH (n:Elements)
WHERE n.container_id = "122"
RETURN n LIMIT 1
MATCH (a:ACityRep)-[r:SOURCE]->(n:Elements)
WHERE n.element_id = "121"
RETURN a.hash
Thanks in advance!
09-04-2020 05:24 AM
09-04-2020 05:37 AM
Thanks 🙂
Solved this by following query:
MATCH (a:ACityRep)-[r:SOURCE]->(s:Elements)
WHERE a.hash = "ID_eb1a9f19-3543-44c0-816d-7788ed3dc036"
WITH s
MATCH (n:Elements)
WHERE n.container_id = s.element_id
WITH n
MATCH (a2:ACityRep)-[r2:SOURCE]->(n2:Elements)
WHERE n2.element_id = n.element_id
RETURN a2 LIMIT 1
All the sessions of the conference are now available online