其中一种方式!
SELECT
x.SUBSNUMBER ,
MAX(DECODE(x.rn,1,x.CONTACTSTARTTIME,NULL)),
MAX(DECODE(x.rn,2,x.CONTACTSTARTTIME,NULL)),
MAX(DECODE(x.rn,3,x.CONTACTSTARTTIME,NULL)),
MAX(DECODE(x.rn,4,x.CONTACTSTARTTIME,NULL)),
MAX(DECODE(x.rn,5,x.CONTACTSTARTTIME,NULL)),
MAX(DECODE(x.rn,6,x.CONTACTSTARTTIME,NULL)),
MAX(DECODE(x.rn,7,x.CONTACTSTARTTIME,NULL)),
MAX(DECODE(x.rn,8,x.CONTACTSTARTTIME,NULL)),
MAX(DECODE(x.rn,9,x.CONTACTSTARTTIME,NULL)),
MAX(DECODE(x.rn,10,x.CONTACTSTARTTIME,NULL)),
MAX(DECODE(x.rn,11,x.CONTACTSTARTTIME,NULL)),
MAX(DECODE(x.rn,12,x.CONTACTSTARTTIME,NULL)),
MAX(DECODE(x.rn,13,x.CONTACTSTARTTIME,NULL)),
MAX(DECODE(x.rn,14,x.CONTACTSTARTTIME,NULL))
FROM (SELECT D.SERIALNO,
D.SUBSNUMBER,
D.CONTACTSTARTTIME,
ROW_NUMBER() OVER(PARTITION BY D.SUBSNUMBER ORDER BY D.CONTACTSTARTTIME) rn
FROM CSPSR.T_CCT_CONTACTDETAIL D
WHERE D.CONTACTSTARTTIME >= TO_DATE('2011-05-01', 'yyyy-MM-dd')
AND D.CONTACTSTARTTIME < TO_DATE('2011-05-02', 'yyyy-MM-dd')) x
GROUP BY x.SUBSNUMBER