Mungkinkah itu?:
SELECT AVG(avg_) as superavg
FROM (
SELECT category, AVG(val) as avg_
FROM foo_table
GROUP BY category
) as avgs;
Mungkinkah itu?:
SELECT AVG(avg_) as superavg
FROM (
SELECT category, AVG(val) as avg_
FROM foo_table
GROUP BY category
) as avgs;