Here is a sample from the table I have been working on:
CREATE TABLE TEST_MC
(
CLUSTER_K INTEGER,
PROCESS_PHASE INTEGER,
SEM_AGG CHAR(1)
);
CLUSTER_K PROCESS_PHASE SEM_AGG
==================================
328 1 M
----------------------------------
328 2 A
----------------------------------
328 3 A
Now, I would like to transpose and collapse rows obtaining the following result:
CLUSTER_K SEM_AGG_1 SEM_AGG_2 SEM_AGG_3
=============================================
328 M A A
How i can achieve this (Pivot and/or analytical functions)?
Any help is greatly appreciated.