select score as ‘成绩‘ ,name as ‘姓名‘ from students
UNION ALL
select AVG(score) from students;
在最后一行显示平均数;
select score as ‘成绩‘ ,name as ‘姓名‘ from students
UNION ALL
select SUM(score) from students;
在最后一个显示合计数;
原文:https://www.cnblogs.com/Thenext/p/11033050.html