1,使用实例:
SELECT t1, t2, aggregate_function(t3)
FROM table
GROUP BY ROLLUP (t1, t2);
2,ROLLUP的列名称修改,使用实例:
SELECT
COALESCE(t1, '自定义列名')t1, aggregate_function(t3)
FROM table
GROUP BY ROLLUP t1;
3,ROLLUP的分组使用,使用实例:
SELECT t1, t2, aggregate_function(t3)
FROM table
GROUP BY t1, ROLLUP (t1, t2);
标签:function,GROUP,t2,ROLLUP,t1,SQL,行求,SELECT From: https://www.cnblogs.com/youngnote/p/16845159.html