You have chosen to sponsor your bid up to a maximum amount of .
In my database I have certain defined items/milestones, each having a certain amount of money allotted as its cost.
This cost is released/paid in bits and pieces over a period of time.
1. Sometimes the amount is released as an absolute amount,
2. sometimes the released amount is described as a percentage of the allotted cost and
3. sometimes as a percentage of the payment yet to be released.
i.e. say, if the cost of milestone A1 is $10,000
i may release $100 on 1 Jan
then 5% of $10,000 (i.e. $500) on 7 Jan
and then 20% (i.e. 20% of $9400) of whatever is the balance payment
and so on, in no particular order, until the entire cost is paid
My inputs are the milestone number, amount released (either [%] or [absolute] or [% of balance]) and date of release
On any given date, the payments for many milestones can also be released simultaneously (either with the same amounts or differing amounts)
Please tell me how to construct a query such that i get a tabulation sorted by milestone number and then sorted by date and an accompanying column indicating the amount of payment left after that particular date's payment.
for eg. something like below,
Milestone no. Date Amount Balance
A1 1 jan 1000
A1 3 jan 500
A1 7 Jan 200
A2 1 jan 10000
A2 3 jan 4000
If the problem is not clear please ask me, I have also attached a small demo file.