mauri rogel <[EMAIL PROTECTED]> wrote: > I'm getting a syntaxt error when using >> select avg( DISTINCT column) from table. > the code above is from the "teach urself sql" book. > i have mandrake 9.1 linux. here's exactly what's > happening: > > mysql> select avg(distinct prod_price) from Products; > ERROR 1064: You have an error in your SQL syntax. > Check the manual that corresponds to your MySQL server > version for the right syntax to use near 'distinct > prod_price) from Products' at line 1 > mysql> > > can some1 tell me what's the mistake here.
AVG(DISTINCT) is not supported. > > much thanks, > mauricio > > ps. i've tried: > mysql> select distinct avg(prod_price) from Products; > but that yields the wrong result > -- 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]