I have a column in a table that the values are in the type of time like 01:12 and 05:14 I want to use sum to add values and get the result in the same type like 06:26 I used this code to do what I want
CASE
WHEN SUM (min) = 60
THEN
TO_CHAR (SUM (hour) + 1) || ':00'
WHEN SUM (min) < 60
THEN
TO_CHAR (SUM (hour))
|| ':'
|| TO_CHAR (SUM (min))
ELSE
TO_CHAR (
SUM (hour)
+ ( SUM (min)/60
- (MOD (
SUM (min),60)/60))
)
|| ':'
|| TO_CHAR (
MOD (
SUM (min),60))
END
and it worked but it is a little complicated ... is there anything simpler than what I did...please tell me... thank you