Delete leaf nodes with single relationship in neo4j
问题 I am trying to remove leaf nodes in Neo4j, but only those with a single incoming relationship. (I'm so close.) I have a query that returns the exact node I wish to remove. However, when I replace the RETURN with DELETE, it removes more than the query returns. Here's the complete sequence: neo4j-sh (?)$ match (n)-[r]->(p) return n, r, p ; +------------------------------------------------------------+ | n | r | p | +------------------------------------------------------------+ | Node[2164]{name