I have query where I SUM times by group
SELECT category,
SEC_TO_TIME(SUM(TIME_TO_SEC(TIMEDIFF(ter_ura_zakljucek, ter_ura_zacetek)))) AS total_time
GROUP_BY 'category'
This seems to work fine on smaller amount of data, but when I execute it on larger amount of rows it seems it always stops at total_time = 838:59:59
Is there some limitation in SQL at amount of times you can sum up?
CodePudding user response:
The range for TIME-datatype is '-838:59:59.999999' to '838:59:59.999999'. See the documentation.
To handle larger time values you have to covert it to something else depending on your need.