Is there any possibility to compare the Value of 1 Attribute value with the rest of the dataset? Like:
ID parent_id lvl
15 2 1
16 2 1
21 15 2
22 15 2
23 16 2
30 21 3
31 21 3
32 22 3
33 23 3
So I want to take, for example, the ID of row#1 (15) and find every row with 15 as parent_id. Then the row#2 with the ID 16 and find every example with the parent_id 16. Then ID 21 to find every entry with the parent_id 21.
The thing is, is want to generate a new attribute for every matched id=parent_id to sort it like:
ID parent_id lvl
15 2 1
21 15 2
30 21 3
31 21 3
22 15 2