Hi,
I am trying to find average price of the shares in the
portfolio table.
I thought something like this should work...
SELECT symbol, ((sum(buyrate*quantity))/quantity) as
average
from portfolio group by symbol;
It does work, but wrong results. What is the correct
query?
Shantanu Oak
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]