SELECT DISTINCT ac.customer_name, ac.customer_number
FROM iby_pmt_instr_uses_all instr_assign,
iby_external_payers_all payee,
iby_ext_bank_accounts bank_acct,
hz_cust_accounts_all hca,
ar_customers ac
WHERE instr_assign.instrument_id = bank_acct.ext_bank_account_id
AND instr_assign.ext_pmt_party_id = payee.ext_payer_id
AND instr_assign.instrument_type = 'BANKACCOUNT'
AND instr_assign.payment_flow = 'FUNDS_CAPTURE'
AND instr_assign.payment_function = 'CUSTOMER_PAYMENT'
AND hca.cust_account_id = payee.cust_account_id
AND ac.customer_number = hca.account_number