Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Max of an Average 1

Status
Not open for further replies.

gussifinknottle

Programmer
Jan 16, 2001
19
US
I have got a table from which I have obtained average values, based on 'GROUP BY' clause. I need to get the max of these average values and display them.

Is there any way I can do an aggregate of an aggregate, like max of an avg in the same Query?

 
Yes, as far as know, you should do somethimg like this:

SELECT MAX(x.mymaxfield) FROM (SELECT ... GROUP BY ...) AS X



I mean "SELECT ... GROUP BY ..." is the query that you have until now.

Hope this will help you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top