I want to write a recursive query using CTE in Presto to find Employee Hierarchy. Do Presto support recursive query?
When I write simple recursion as
with cte as(select 1 n
union all
select cte.n+1 from cte where n<50)
select * from cte
It gives error that
Error running query: line 3:32: Table cte does not exist
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…