SELECT table_S.column_S AS value_column_S, (SELECT CASE WHEN first_value(table_T.column_U) = \'A\' THEN 1 WHEN first_value(table_T.c