Mysql
 sql >> Datenbank >  >> RDS >> Mysql

MySQL - SUMME einer Gruppe von Zeitunterschieden

Select  SEC_TO_TIME(SUM(TIME_TO_SEC(timediff(timeOut, timeIn)))) AS totalhours
FROM volHours 
WHERE username = 'skolcz'

Wenn nicht, dann vielleicht:

Select  SEC_TO_TIME(SELECT SUM(TIME_TO_SEC(timediff(timeOut, timeIn))) 
FROM volHours 
WHERE username = 'skolcz') as totalhours