Page 1 of 1

Sqlite calculating

Posted: Tue Jul 17, 2018 3:07 am
by Dummy1912
Hello,

Can someone help me out please
i can't get it to work
Code: Select all
            attributes = "mypayments.num,mypayments.mdate,mypayments.mamount,mydebtsborrow.mamount,mydebtsborrow.mamount - mypayments.mamount"

its keep the same value :(
like we have 26.731,32 we want to calculate that by 318.23 and then get the output
and then we don't know how we can use that output again to calculate it again by the next record

the first record sum shows as: 26.413,09
the mypayments.mamount records have only 318.23 as amount
and the basic of this account mydebtsborrow.mamount has 26.731,32

so when we calculate it all i need at the end of the data 19.730,26

Thank you

Re: Sqlite calculating

Posted: Thu Jul 19, 2018 3:24 am
by Dummy1912
This is the code in sqlite itself
but i can't manage it to work what we are looking for :(
Code: Select all
SELECT mypayments.num,mypayments.mamount,mydebtsborrow.mamount,mydebtsborrow.mamount - mypayments.mamount as TOTAL FROM mypayments left JOIN mydebtsborrow ON mydebtsborrow.num = mypayments.mnum WHERE mypayments.mnum=6 ORDER BY mypayments.num DESC ;