Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-25-2022 08:59 AM
I want to write a query to get my chain of nodes
Loop HAS_TAG Tag
Tag HAS_ALARM Alarm
Tag HAS_CABLE Cable
I want the 4 nodes in the same query
09-25-2022 10:00 AM
You can try something like this. The outputs are examples; change to meet your requirements.
match(l:Loop{id:0})
optional match (l)-[:HAS_TAG]->(t:Tag)
with l, t
optional match(t)-[:HAS_ALARM]->(a:Alarm)
with l, t, a
optional match(t)-[:HAS_CABLE]->(c:Cable)
return l.Loopname, labels(t) as tag_type, properties(a) as alarm, properties(c) as cable
All the sessions of the conference are now available online