当需要分组且自动有一个合计行时 group by dept with rollup 当需要给这个合计行一个命名时 合计行行头默认为空,要取名用如下方式 coalesce(dept,'合计') as dept