摘要: --例如 with a as ( select 'a' A, 'b' B ,5 C ,2 D from dual union all select 'w', 'b', 1, 3 from dual union all select 'x' ,'x' ,3 ,1 from dual ) select decode(grouping(A),1,'合計',A) A ,B,sum(C) C,SUM(D) D from a group by rollup ((a,b))create table 阅读全文
posted @ 2013-12-10 14:14 lonsine 阅读(338) 评论(0) 推荐(0) 编辑