0
votes

example:

vertex:A,B,C,D

edge:DOWN

A-------(DOWN)--->B-----(DOWN)---->C-----(DOWN)---->D

I want to the relust like this:

$depth | parent_name | name
-------+-------------+-----    
0      | A           | A
1      | A           | B
2      | B           | C
3      | C           | D

help me!!!

1
Hi, which version are you using? Thx - Michela Bonizzi
Orientdb:2.2.26 - Tong.Kim

1 Answers

0
votes

i think you only use one edge. in your case You could use the traverse sql with depth. for more information you could read this doc. https://orientdb.com/docs/2.1/SQL-Traverse.html