56,675
社区成员
发帖
与我相关
我的任务
分享
mysql> select ifnull(username,'total'),sum(fs) from test group by username with rollup;
+--------------------------+---------+
| ifnull(username,'total') | sum(fs) |
+--------------------------+---------+
| aa | 30 |
| bb | 35 |
| cc | 10 |
| total | 75 |
+--------------------------+---------+
4 rows in set (0.00 sec)