Input:
I need to group by (mnth_end_d, id, name) and check if there is a value for debt_calc corresponding to when period_rank = 'T'. And if there's a value, you create this new column debt_exists and populate it with TRUE or FALSE as in the output table below. Any tips on how to do that in Teradata without using any joins (perhaps using partition over)?
Output:

