you probably have items starred more than once

so you have to aggregate somehow, e.g.

RETURN m,collect(r) as ratings

or

RETURN m,collect(distinct type(r)) as star_types

or

WITH m,type(r) as stars, count(*) as cnt
RETURN m, collect([stars,cnt]) as ratings



Am 08.01.2014 um 06:58 schrieb Sukaant Chaudhary <[email protected]>:

> Hi,
> Please help me to remove duplicate nodes.
> In the following query, I'm getting the duplicate nodes:
> 
> START n=node(4) 
> MATCH p=(n)-[:ADDED_TO_GOOGLE_CALENDAR*]->(m) 
> WITH DISTINCT m 
> MATCH 
> q=(n)-[r:ZERO_STAR|ONE_STAR|TWO_STAR|THREE_STAR|FOUR_STAR|FIVE_STAR]->(m)  
> WITH r, m 
> RETURN m, r;
> 
> -Sukaant Chaudhary
> 
> -- 
> 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/groups/opt_out.

-- 
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/groups/opt_out.

Reply via email to