How to calculate balance from debit and credit. Done with a first cross apply (cc1).