Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Selecting count(*) from multiple tables - response (1) by learndwh

$
0
0

Hi
 
try out the below query ... it will solve your proble
 
select acc_no, sort_code, count(credit.acc_no), count(debit.acc_no)
from account_details acct
inner join credit_trans credit
on acct.acc_no = credit.acc_no
inner join debit_trans debit
on acct.acc_no = debit.acc_no
group by acc_no, sort_code
 
Thanks
LearnDWH


Viewing all articles
Browse latest Browse all 14773

Trending Articles



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