I need to make a query with the expected result as below. Consider the prev. Balance is auto-calculated field. And i want to populate with MYSQL query by taking the Balance (from previous row) see picture. How to query out using mysql? The date can be any date not sequential and that below is just an illustration.
Note that the previous balance is just a sequence of the old balance. Meaning that the first previous balance always null or zero and the balance get its amount from added amount. From the first balance the second record start to have its previous balance and it goes on and on
See Question&Answers more detail:os