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.

much thanks,
mauricio

ps. i've tried:
mysql> select distinct avg(prod_price) from Products;
but that yields the wrong result

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

Reply via email to