select pd.specialization ,
SEC_TO_TIME(SUM(TIME_TO_SEC(m.totalTime))) as totalDuration
from mergedVideos m
inner join professionaldetails pd on pd.candidateId = m.candidateId
where m.interviewSessionId is not null
and pd.specialization = 1
输出
specialization :1 totalDuration: 838:59:59
select pd.specialization ,
(SUM(TIME_TO_SEC(m.totalTime))/3600) as totalDuration
from mergedVideos m
inner join professionaldetails pd on pd.candidateId = m.candidateId
where m.interviewSessionId is not null
and pd.specialization = 1
specialization:1 totalDuration:1207.7658
我的问题是为什么 TIME_TO_SEC 函数没有像在第一个查询持续时间是 838:59:59 那样返回期望输出,而在 sec 查询中除以 3600 显示不同的结果 1207.7658(hr)