MySQL Forums
Forum List  »  Newbie

Re: sum and avg in same query
Posted by: Roland Bouman
Date: July 26, 2005 06:19AM

if your version supports subqueries (> 4.1) you can:

select sum(avg_score)
from (
select avg(score) as avg_score
from scores
group by ..
) as avg_score

but i dont know if this is a solution for your performance problem.

I hope it helps...

Options: ReplyQuote


Subject
Written By
Posted
July 26, 2005 02:48AM
Re: sum and avg in same query
July 26, 2005 06:19AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.