I have a sql database with a time field.
The runtime field contains 02:06:24, 00:01:12 , etc.
I am trying to return the average value of this field in the format HH: MM: SS using;
SELECT AVG( runtime ) FROM `result`
This returns 8312.2342729307 , which I thought was the average in seconds, however, when it is converted to minutes, this is not true.
I can return MIN and MAX runtimes in the correct format, but I can’t get AVG, how can I do this?
Failure, that in any case, choose the middle element to use as the average mean?
Mark taylforth
source share