cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Trying to limit my match to 10 results for a node of a specific type and its related nodes. Limit not working as expected

Hi,

I am trying to match node of a specific type (lets say - car) and its related nodes (like - make, model etc) and limiting the results to 10 nodes, But the limit is not working as expected.

Related nodes can range from 5-15 in number. But I want 10 car nodes with all its related nodes. Running this query -

match (n:car)-[r]->(m) return n,r,m limit 10

How can I get desired result using a single query ?
Thanks.

1 REPLY 1

ameyasoft
Graph Maven
Try this:
match (n:car)
with n limit 10
natch (n)-[r]->(m) return n,r,m