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.

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