try this (see also the syntax fixes)

> MATCH A-[:R]-B
   WITH A, B
> ORDER by A.created_at DESC, B.created_at DESC
   RETURN A, collect(B)[0..5]
   LIMIT 10



> LIMIT 10
> AND ORDER B BY created_at DESC LIMIT 5


> Am 14.03.2015 um 07:43 schrieb Daniel Modry <[email protected]>:
> 
> Hi all,
> 
> I'm a newbie (this is my first post here) :)
> 
> I wanna ask you, if I have a query
> 
> MATCH A-[R]-B
> 
> And I wanna ORDER A BY created_at DESC LIMIT 10
> and get at most 5 of B records
> 
> 
> Someting like:
> 
> MATCH A-[R]-B
> ORDER A BY created_at DESC LIMIT 10
> AND ORDER B BY created_at DESC LIMIT 5
> 
> 
> Hot to solve this in neo4j? Is it possible?
> 
> Thank you in advice.
> Daniel
> 
> -- 
> 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