select client_number, account_amount_grfrom int_transactionswhere institution_number = '00000051' and record_date = (select posting_date from bw3.sys_posting_date where institution_number = '00000051' and station_number = '130') and transaction_type = '470' and transaction_class = '002' and transaction_status = '002' and transaction_source = '031' and dr_cr_indicator = '002' and reversal_flag = '000'order by to_number(account_amount_gr) desc
Accounts with credit interest balance
select cca.acct_number, ccbb.current_balancefrom cas_client_account cca inner join cas_cycle_book_balance ccbb on cca.acct_number = ccbb.acct_number and cca.institution_number = ccbb.institution_number and ccbb.processing_status = '004'where service_contract_id in ('400','411','414') and account_type_id = '203'and ccbb.current_balance > 0
Credit interest posted
select acct_number, account_amount_grfrom int_transactionswhere institution_number = '00000051' and record_date = (select posting_date from bw3.sys_posting_date where institution_number = '00000051' and station_number = '130') and transaction_type = '347' and transaction_class = '002' and transaction_status = '002' and reversal_flag = '000'order by to_number(account_amount_gr) desc