Aditya or others, can you join or match up t2 with t1 in your example, i.e. translated to my code,
with t1 as (select * from AA where FIRSTNAME like 'Kermit'),
t2 as (select * from BB B join t1 on t1.FIELD1 = B.FIELD1)
I am not clear whether only WHERE is supported for joining, or what joining approach is supported within the 2nd WITH entity. Some of the examples have the WHERE A=B down in the body of the select "below" the WITH clauses.
The error I'm getting following these WITH declarations is the identifiers (field names) in B are not recognized, down in the body of the rest of the SQL. So the WITH syntax seems to run OK, but cannot access the results from t2.