You can use conditional aggregation:
select key1, key2, date,
max(case when type = 'ABC' then value end) as abc,
max(case when type = 'DEF' then value end) as def,
max(case when type = 'GHI' then value end) as ghi,
max(case when type = 'JFK' then value end) as jfk
from t
group by key1, key2, date;
Here is a db<>fiddle.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…