MATCH (n:Label)
WITH n.uniqueId, collect(n) as nodes
WHERE size(nodes) > 1
FOREACH (n in tail(nodes) | DELETE n)

> Am 27.02.2015 um 03:52 schrieb Gallagher Polyn <[email protected]>:
> 
> After loading a messy CSV dataset, I have many nodes with the same unique ID. 
> 
> I'd like to use Cypher to remove all duplicate nodes, where my basis for 
> determining duplication would be comparing one field, namely, 
> 'some-unique-id'. 
> 
> How can I accomplish the above with Cypher?
> 
> Thanks,
> 
> Gallagher
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to