I am new to neo4j and I'm trying to get a list of nodes (that has not a specific relation) and count node name duplicates.
MATCH (e:ExampleNode) WHERE NOT exists((e)-[:EXAMPLE_REL]->()) RETURN e.name as name, count(e.name) as count
So far so good...
Beside the name of the node I also need some more values. This value makes each result unique and returns every node separately even (if the name is the same).
MATCH (e:ExampleNode) WHERE NOT exists((e)-[:EXAMPLE_REL]->()) RETURN e.name as name, count(e.name) as count, e.property as someValue
But...this is the result I would like to have:
I would like to return every node that hasn't the specific relation and count all duplicates by the name.
So, is it possible to get the result I would like to have?
Solved! Go to Solution.