Select LOB,
CMPGN_NAME,
INC_TRXN_CD as TRANSACTION_CD ,
sum ( INC_AMT ) as TOTAL_DOLLAR_AMT , count (*) as TOTAL_ACCTS
from UD466.FF_PRCSS where Elg_Flg='Y'group by grouping sets ((1,2,3), ())
order by grouping(LOB), LOB, grouping(CMPGN_NAME), CMPGN_NAME, grouping(INC_TRXN_CD), INC_TRXN_CD
Some how i am not able to write the query to ignore NULL and use TOTAL in third , can you tell me the exact syntex . please?
Select LOB,
CMPGN_NAME,
INC_TRXN_CD as TRANSACTION_CD ,
sum ( INC_AMT ) as TOTAL_DOLLAR_AMT , count (*) as TOTAL_ACCTS
from UD466.FF_PRCSS where Elg_Flg='Y'group by grouping sets ((1,2,3), ())
order by grouping(LOB), LOB, grouping(CMPGN_NAME), CMPGN_NAME, grouping(INC_TRXN_CD), INC_TRXN_CD
Some how i am not able to write the query to ignore NULL and use TOTAL in third , can you tell me the exact syntex . please?