something like this
(0)[db2inst1@dlx00031 thebrain]$ db2 "select sum(connections),substr(char(ctime),1,5) from tt group by substr(char(ctime),1,5) order by 2"
1 2
----------- -----
600 09:13
1 record(s) selected.
(0)[db2inst1@dlx00031 thebrain]$ db2 "select * from tt"
CONNECTIONS CTIME
----------- --------
100 09:13:00
200 09:13:01
300 09:13:02
3 record(s) selected.
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be