I am trying to perform recursion multiple times using Teradata my query is similar to the following, upon referencing the query_1 from query_2 and trying to run it gives an error saying that query_1 doesn't exist.
WITH RECURSIVE query_1 AS ( --some recursive query ) ,RECURSIVE query_2 AS ( --another recursive query based on results from query_1 ) SELECT * FROM query_2
I want to concatenate values from different levels of hierarchy so I want to turn
------------------------------------
 trx    indx1   indx2   val
------------------------------------
 x1      1       1       a
 x1      1       2       b
 x1      1       3       c
 x1      2       1       d
...................................
-----------------------------------
Into the following
----------------
 trx        val
----------------
 x1       a/b/c/d