select id,area,stu_type,sum(score) score from students group by cube(id,area,stu_type) order by id,area,stu_type; /*--------理解cube select a, b, c, sum( d ) from t group by cube( a, b, c) 等效于 select a, b, c, sum( d ) from t group by grouping sets( ( a…