"Charles Warren" <[EMAIL PROTECTED]> wrote: > > I've searched the manuals and any websites I can find but am still at a loss > on how to calculate what I thought was going to be an easy 'Average' of Call > Times. > > Situation. Have a table which is updated daily for users metrics and have > configured one column as TIME which should have the default format (if I > understand correctly) of HH:MM:SS. > > However when I try to calculate an average for an individual who has the > following two times listed: > > 00:09:15 > 00:04:26 > > it calculates the average as being 670.5 > > The query I'm running is > > SELECT AVG(avg_tt) > FROM table > WHERE agent_ln = "name" > > It is changing the times to 915 + 426 = 1341/2 = 670.5 > > Does anyone know what I'm doing wrong?
You should use AVG() with SEC_TO_TIME() and TIME_TO_SEC() functions. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]