Simon Garner wrote:
Mike Blezien wrote:

Hello,

when using the AVG function like this:
SELECT AVG((5+8+10)/3) AS rate;

it returns NULL??

the AVG can be used to do a literal math calculation ??

TIA


That doesn't make any sense... AVG is a GROUP BY function.

If you have 3 rows with values 5, 8 and 10 then surely

    SELECT (5+8+10)/3 AS rate;

is what you want?

-Simon


Exactly, my mistake... too long of a day. got my logic mixed up :)

thx's

--
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to