Getting sum of rows based on column in oracle -


i want sum of values of 1 column group column. e.g

month     count jan         5 jan         7 feb         1 feb         2 

i want

month     count   status jan         5       jan         7       b jan        12      sum feb         1       feb         2       b feb         3      sum 

one way rollup. however, because want original data, approach "fake" aggregation rownum rollup:

select month, sum(count),        (case when rn null 'sum' end) status (select rownum rn, t.*       t      ) t group month, rollup(rn) 

i'm not sure mean a , b in status column.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -