hi all.
how to transform this algorithm in MySQL ? :
- Start1 (from 2011/01/01 to 2011/02/20) = 10284 + (9749*20/28)=17247,6
- Start2 (from 2011/01/01 to 2011/02/20) = 7045 + (7475*20/28)=12384,3
would be a progressive calculation today reported on previous year.
when 20 value is today previous year, 28 value is number of days the month February and remaining data are recorded in this table:
Maximum Minimum Months Years ID
10284 7045 1 2011 01
9749 7475 2 2011 02
8749 7666 3 2011 03
4911 2336 4 2011 04
7496 5826 5 2011 05
8526 7789 6 2011 06
4157 3300 7 2011 07
10566 9425 8 2011 08
23065 21333 9 2011 09
78965 56922 10 2011 10
3579 2000 11 2011 11
15963 11106 12 2011 12
hope for your help.