This example works on DB2 when the values being added are TIME columns (as shown in original question). The trick is to convert the times to elapsed seconds, which are much easier to add up.
WITH origTbl (origTime) AS (VALUES
( TIME( '0:00:01' ) ),
( TIME( '0:00:08' ) ),
( TIME( '0:00:12' ) ),
( TIME( '0:00:38' ) ),
( TIME( '0:01:04' ) ),
( TIME( '2:04:49' ) ),
( TIME( '15:48:38' ) ),
( TIME( '23:30:59' ) ),
( TIME( '7:05:52' ) ),
( TIME( '8:17:29' ) )
)
,
totSeconds( secs ) AS (
SELECT SUM( MIDNIGHT_SECONDS( origTime ) )
FROM origTbl
)
SELECT RTRIM( CHAR( secs/3600 ) ) || ':' ||
LPAD( RTRIM( CHAR( MOD(secs, 3600)/60 ) ), 2, '0' ) || ':' ||
LPAD( RTRIM( CHAR( MOD(secs, 60) ) ), 2, '0' ) AS totHMMSS FROM totSeconds
;
TOTHMMSS
-----------------
56:49:50
1 record(s) selected.