Does teradata allow to use cascading case statements.
sum ( case when exp1 then Case when exp2 then End Else End
If yes will there be a performance issue? Each cascade condition actually has a join on a different table (ie records qualifying in exp1 of case1 from table1 will be checked in exp2 of case2 which will again join with table2) .
say exp1 would be a.col1=b.col1 when this satisfied exp2 would be b.col2=c.col1
If there would be a performance issue with this approach let me know if there is a better way to get this done.