By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Records: 7 Duplicates: 0 Warnings: 0
ID | ParentID |
---|---|
1 | null |
2 | 1 |
3 | 2 |
4 | 3 |
5 | null |
6 | 5 |
7 | 6 |
ID | MIN(PATH) |
---|---|
1 | 1 |
2 | 1 |
3 | 1 |
4 | 1 |
5 | 5 |
6 | 5 |
7 | 5 |