MATCH (p:Movie)-[r:directedBy]-(q:Director) RETURN q.name as director, collect(p.title)[0..2] as movies
On Tue, Sep 16, 2014 at 12:22 PM, Srinivas Nagamalla <srinivas5...@gmail.com > wrote: > MATCH (p:Movie)-[r:directedBy]-(q:Director) > > I want to get the movies and directors group by director name and for each > group I want at most 2 records > > Example output: > Movie Director > m1 per1 > m2 per1 > m3 per2 > m4 per2 > > > -- > 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 neo4j+unsubscr...@googlegroups.com. > For more options, visit 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 neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.