I have a query that pulls transaction date and amount per customer. I would like to add to my select statement a method to calculate Current Balance owed by the customer and the Highest Balance Owed over his history with us.
Thanks in advance!
Jason
select transdate,amountmst from custtrans
where dataareaid = 'zos' and accountnum = '0000195'
Trx Date Trx Amt
08/24/08 10000
08/26/08 -10000
02/01/09 4000
03/01/09 100
03/24/09 -1000
04/02/09 200
05/03/09 300
06/24/09 1000
06/25/09 -300
07/24/09 50
Thanks in advance!
Jason
select transdate,amountmst from custtrans
where dataareaid = 'zos' and accountnum = '0000195'
Trx Date Trx Amt
08/24/08 10000
08/26/08 -10000
02/01/09 4000
03/01/09 100
03/24/09 -1000
04/02/09 200
05/03/09 300
06/24/09 1000
06/25/09 -300
07/24/09 50