I am not getting the results that I am looking for may query.
Here is my sql
Select Count(*) as TotalAccounts, Sum(Orig_amt) as SumOrig_AMT, Sum(Cur_Bal) as SumCurBal, Sum(Pmt_amt) as SUMPmtamt
from Client_debt
Left outer join Client_pmt on client_debt.debt_id = client_pmt.debt_id
The client_debt table is a list of account numbers that have an original balance and a current balance, then the client_pmt table has payments that were made to these accounts. The issue is that when a person makes more that one payment for a particular account, this causes my totals from my first table to rise and the number of records in the count as well.
How is this supposed to be done?
Thanks
Mike
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

