'Turn a company structure string into a table hierarchy
Is it possible to turn a company structure string into table hierarchy? boss/manager_1/manager_2/manager_3/employee
For example:
I've got this far but I'm stumped
WITH one AS (
SELECT SPLIT(company_structure, '/') AS employees
FROM t1 ),
two AS (
SELECT employees[1] as Level_1,
employees[2] as Level_2,
employees[3] as Level_3,
employees[4] as Level_4
)
SELECT * FROM two
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

