I first investigated the issues raised in this topic regarding HSQL embedded (ROUNDING and use of FLOOR) many years ago.
since when did 31038 seconds = 9hr 37 min 18 secs?
this is the second time an incorrect answer has been tagged ‘Solved’ and that misleads and confuses other users.
.
Once the issues are understood then the coding is easy.
the code I posted (one query) shows the sum of seconds in 3 different formats.
it’s 100% accurate, contains no unnecessary code, is modular and transparent.
.
I don’t like to jump in and post when someone else is addressing an issue because that often leads to confusion, but equally when an accepted answer is incorrect/inaccurate then it’s in the interest of other users that this is highlighted.