By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
6 rows affected
W_ID | Title | Parent_id | View_Parent_id |
---|---|---|---|
1 | AAA | null | null |
2 | BV | 1 | 1 |
3 | CX | 2 | 1+2 |
4 | DSO | 2 | 1+2 |
5 | ER | 3 | 1+2+3 |
6 | ER | 5 | 1+2+3+5 |
w_id | parent_id | view_parent_id | title_1 | title_2 | title_3 | title_4 | title_5 |
---|---|---|---|---|---|---|---|
2 | 1 | 1 | AAA | null | null | null | null |
3 | 2 | 1+2 | AAA | BV | null | null | null |
4 | 2 | 1+2 | AAA | BV | null | null | null |
5 | 3 | 1+2+3 | AAA | BV | CX | null | null |
6 | 5 | 1+2+3+5 | AAA | BV | CX | ER | null |
Warning: Null value is eliminated by an aggregate or other SET operation.
w_id | title | parent_id | view_parent_id | title_1 | title_2 | title_3 | title_4 | title_5 |
---|---|---|---|---|---|---|---|---|
1 | AAA | null | null | null | AAA | null | null | null |
2 | BV | 1 | 1 | AAA | BV | null | null | null |
3 | CX | 2 | 1+2 | AAA | BV | CX | null | null |
4 | DSO | 2 | 1+2 | AAA | BV | DSO | null | null |
5 | ER | 3 | 1+2+3 | AAA | BV | CX | ER | null |
6 | ER | 5 | 1+2+3+5 | AAA | BV | CX | ER | ER |
Warning: Null value is eliminated by an aggregate or other SET operation.