I am getting this issue when i try to get all end nodes
using query
match p=(n:ASSET {uniqueID:"some id"})-[m*]-() return p
please help me write a query where i get only those nodes that are either forward node or backward node
but not the sibling nodes
means query should return only forward and backward nodes only, not forward nodes of backward nodes
NOTE THIS DATA CAN HAVE N NUMBER OF STEPS