Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. rowid | date | name | debit | credit
  2.  
  3. 7 | 24.07.2017 | bob | 792 | 0
  4.  
  5. 1 | 25.07.2017 | jon | 792 | 0
  6.  
  7. 5 | 25.07.2017 | maggi| 0 | 500
  8.  
  9. select date,
  10. name,DEBIT,CREDIT,
  11. (select SUM(cashwithdraw)-SUM(cashdeposit) from _temp as a where a.rowid<=b.rowid )+0.0 AS balance,
  12. from _temp as b order by date
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement