" select
SEC_TO_TIME(SUM(TIME_TO_SEC(m.totalTime))) as totalDuration
from m
inner join pd on pd.candidateId = m.candidateId
where m.s_id is not null
and pd.s = 1"
OUTPUT :totalDuration: 838:59:59
"select
(SUM(TIME_TO_SEC(m.totalTime))/3600) as totalDuration
from m
inner join pd on pd.candidateId = m.candidateId
where m.s_Id is not null
and pd.s = 1"
Output:totalDuration:1207.7658
My question is why TIME_TO_SEC Function not returning desire output like in first query duration is 838:59:59 and in sec query by dividing 3600 it is shown different result 1207.7658(hr)