I have a table like

and
i want that table to be converted to

Using TeraData Query
I have a table like

and
i want that table to be converted to

Using TeraData Query
 
    
     
    
    If you know the list of values, you can use conditional aggregation:
select max(case when name = 'AA' then value end) as aa,
       max(case when name = 'BB' then value end) as bb,
       max(case when name = 'CC' then value end) as cc,
       . . .
from t;
If you don't know the list of values, then you cannot do this with a simple SQL query.
