You would have to first get the AVG() results, store them in a temporary table, then get the MAX():
[tt]
CREATE TEMPORARY TABLE t AS
SELECT AVG(field1) a FROM tbl1;
SELECT MAX(a) m FROM t;
[/tt]
Of course, the AVG() query would have to grouped:
[tt]
CREATE TEMPORARY TABLE t AS
SELECT AVG(field1) a
FROM tbl1
GROUP BY field2;
SELECT MAX(a) m FROM t;
[/tt]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.