By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| ID | data |
|---|---|
| 1 | ["section1","section2","section1","section3"] |
| 2 | ["section2","section4"] |
| id | section1 | section2 | section3 | section4 |
|---|---|---|---|---|
| 1 | 2 | 1 | 1 | null |
| 2 | null | 1 | null | 1 |
| id | section1 | section2 | section3 | section4 |
|---|---|---|---|---|
| 1 | 1 | 1 | 1 | 0 |
| 2 | 0 | 1 | 0 | 1 |