By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
EmpID | Name | Path | ParentId | JobLevel |
---|---|---|---|---|
1 | boss | / | null | 1 |
2 | managerA | /1/ | 1 | 2 |
3 | managerB | /2/ | 1 | 2 |
4 | managerC | /3/ | 1 | 2 |
7 | empC | /2/3/ | 3 | 3 |
5 | empA | /1/1/ | 2 | 3 |
6 | empB | /1/2/ | 2 | 3 |
8 | empD | /1/1/2/ | 6 | 4 |
9 | empE | /1/1/3/ | 6 | 4 |