I have written a count function that gives a reuslt of count of each client. How can I get he total of all the counts.
Here is the SQL.
select count(*) as Records, ctrn_cldt_clnt_id, ctrn_apply_code, ctrn_transaction_type_code_txt
from ctrn
where ctrn_cldt_clnt_id in (2201, 3002, 3014,5803, 3003, 3007, 3015, 2301) and ctrn_apply_code = 'H'and ctrn_transaction_type_code_txt in ('N', 'A')
group by ctrn_cldt_clnt_id, ctrn_transaction_type_code_txt, ctrn_apply_code;
COUNT(*) CTRN_CLDT_CLNT_ID CTRN_APPLY_CODE CTRN_TRANSACTION_TYPE_CODE_TXT
--------------------------------------- ----------------- --------------- ------------------------------
1 2201 H A
81 2201 H N
I want a result that display's 1+81
Thank you
Here is the SQL.
select count(*) as Records, ctrn_cldt_clnt_id, ctrn_apply_code, ctrn_transaction_type_code_txt
from ctrn
where ctrn_cldt_clnt_id in (2201, 3002, 3014,5803, 3003, 3007, 3015, 2301) and ctrn_apply_code = 'H'and ctrn_transaction_type_code_txt in ('N', 'A')
group by ctrn_cldt_clnt_id, ctrn_transaction_type_code_txt, ctrn_apply_code;
COUNT(*) CTRN_CLDT_CLNT_ID CTRN_APPLY_CODE CTRN_TRANSACTION_TYPE_CODE_TXT
--------------------------------------- ----------------- --------------- ------------------------------
1 2201 H A
81 2201 H N
I want a result that display's 1+81
Thank you