MySQL Forums
Forum List  »  Newbie

sum and avg in same query
Posted by: Stuart Roe
Date: July 26, 2005 02:48AM

Hi guys,

Got a question with regards to using sum and avg functions in a select. What I'm trying to do is sum a set of average scores, but I'm always running into errors, using sum and avg in the same statement.

I'm currently having to execute two select statements to create the results. The first is calculating the average and the second is summing the results. It's taking forever to exec. Is it possible to combine the calculation into a single sql statement?

Options: ReplyQuote


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


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.