select id,
decode(type,'first',number) first,
decode(type,'second',number) second,
decode(type,'third',number) third
from tableA;
decode(type,'first',number) first,
decode(type,'second',number) second,
decode(type,'third',number) third
from tableA;
SUM(DECODE(type,'second',number)) 'second',
SUM(DECODE(type,'third',number)) 'third'
FROM exp_table
GROUP BY id
sum(decode(type,'first',number)) first,
sum(decode(type,'second',number)) second,
sum(decode(type,'third',number)) third
from tableA
group by id;