When a certain expression is used to create a new variable:
create table ouput2 as
select
put(Team,$Ffmt.) as Team_Category,
count(*) as No_Customers
and the same expression is used in the group by:
group by put(Team,$Ffmt.)
the SQL compiler should recognize this and act as if the new variable had been used instead:
group by calculated Team_Category
and avoid the (accidental) remerging with the original data