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.

I need to create cypher query for all parent nodes and level

I have simple use case where I have cyclic parents
A>B>C>D>E
F>G>H>C>I

If I search C I need to get all parents and level
C C>B 1
C C>B>A 2
C C>H 1
C C>H>G 2
C C>H>G>F 3

2 REPLIES 2

Can you show the Cypher you've tried so far, and how that hasn't met what you're looking for?

That may help us figure out if there's a misunderstanding we can focus on.

Hi @swapnilspra,

Maybe try length functions?
More information in docs: https://neo4j.com/docs/cypher-manual/current/functions/scalar/#functions-length