Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set @total=0;
- select
- data,
- tipo,
- documento,
- IF (valor>0,valor,0) as credito,
- IF (valor<0,valor,0) as debito,
- @total:=@total+valor as saldo
- from fin_lancamentos
- order by data;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement