Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

How to sum up the columns total value in the last row - response (6) by nileshbhaw

$
0
0

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?


Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>