0

I have relationships and nodes like this

(x:Execution)-[:with]->(first:Param)->[:with]-(second:Param)-...[:with]->(last:Param)

Here (Param) can be any number of times and (Execution) is optional and may be missing. I need to find all such (first:Param) where (Execution) is missing.

Can anyone help me write Neo4j Cypher query for this?

Dave Bennett
  • 10,996
  • 3
  • 30
  • 41
Fayaz
  • 314
  • 6
  • 20

1 Answers1

1

If this can be accurately described as a :Param node with no incoming :with relationship, you can use this to find your nodes:

MATCH (first:Param)
WHERE NOT ()-[:with]->(first)
RETURN first
InverseFalcon
  • 29,576
  • 4
  • 38
  • 51