You need a subquery: select z, avg(sumval) from (select y, z, sum(x) as sumval from t group by y, z ) t group by z.
確定! 回上一頁