select index_type,sum(button) from CUSTOM_HOME_SQL_CONFIG group by rollup(index_type)
group by 字段 :是按字段index_type分组,并求出每个组的sum(button)
group by rollup (字段):不仅求出每个组的sum(button),还会产生一行记录是所有组的和。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28754450/viewspace-761381/
,如需转载,请注明出处,否则将追究法律责任。