I am trying to join two table using a primary key, my problem is that one table has multiple listing of that primary key, I only want to join to the primary key once. Can anyone show me how this can be done
Table1
acct_no sale_am tran_cd
123 50 2
123 54 1
113 20 9
124 30 7
Table2
acct_no exp_am res_am
123 50 20
113 24 30
124 60 10
What I need:
acct_no sum(sale_am) sum(exp_am) sum(res_am)
123 104 50 20
113 20 24 30
124 30 60 10
Thanks