Another not so nested output might be

MATCH (tt)<-[tu:ADD|REMOVE]-(tv:tocversion) WITH tt,tu,collect(tv) AS 
TvCollection WITH tt,COLLECT([type(tu),[x IN TvCollection WHERE x.version>=2| 
x.version]]) AS tus RETURN tt.id,head(tus) AS filtered 


MATCH (tt)<-[tu:ADD|REMOVE]-(tv:tocversion)
WITH tt,tu,collect(tv) AS TvCollection
WITH tt,COLLECT([type(tu),[x IN TvCollection 
                                 WHERE x.version=2 | x.version]]) AS tus
RETURN tt.id,head(tus) AS filtered

Den torsdagen den 17:e april 2014 kl. 22:21:20 UTC+2 skrev Tom Zeppenfeldt:
>
> I'm running a cypher query containing this:
>
> MATCH (tt)<-[tu:ADD|REMOVE]-(tv:tocversion) 
> WITH tt,tu,tv ORDER BY tt.id,tv.version DESC
> WITH tt,COLLECT([type(tu),tv.version]) AS tus
> RETURN tt.id, [x IN tus WHERE x[1]=2 | [x[0],x[1]]] AS filtered
>
> which produces correct results.  
>
> However, if I replace the  x[1]=2  in the last line by x[1]>=2  I get an 
> error
>
> Type mismatch: expected String but was Integer (line 7, column 37)
> "RETURN tt.id, [x IN tus WHERE x[1]>=2 | [x[0],x[1]]] AS filtered"
>
>

-- 
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