Skip to Content
0 likes
Walk a Tree With a Recursive CTE Level: Advanced

Walk down an employee tree, walk up to the top, count each manager's team and guard the query against a loop with CYCLE. After this, you can query a parent-child table of any depth.