Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Input Dataset
- AccountNO AccountType Opening Date Serial Due Balance
- ---------- ----------- ------------ ----------- ---------- --------
- A1 A 05-Jan-2012 1 1000.00 2700.00
- A1 A 05-Jan-2012 2 1000.00 2700.00
- A1 A 05-Jan-2012 3 2000.00 2700.00
- A1 A 05-Jan-2012 4 700.00 2700.00
- A2 A 06-Jan-2012 1 100.00 2700.00
- A2 A 06-Jan-2012 2 200.00 2700.00
- A2 A 06-Jan-2012 2 500.00 2700.00
- A3 A 07-Jan-2012 1 500.00 2700.00
- A3 A 07-Jan-2012 2 700.00 2700.00
- A3 A 07-Jan-2012 3 400.00 2700.00
- B1 B 05-Jan-2012 1 1000.00 1100.00
- B1 B 05-Jan-2012 2 1000.00 1100.00
- B2 B 06-Jan-2012 1 100.00 1100.00
- B2 B 06-Jan-2012 2 100.00 1100.00
- Grouping will be done by AccountType.
- Priority will be set by Opening Date AND Serial.
- A/C Type Opening SL Due Balance Remaining Explanation
- --- ---- ---------- ---- ----- -------- --------- ------------
- A1 A 05-Jan-2012 1 1000.00 2700.00 2700.00 This row will be selected as output.
- A1 A 05-Jan-2012 2 1000.00 2700.00 1700.00 This row will be selected as output.
- A1 A 05-Jan-2012 3 2000.00 2700.00 700.00 This row will not be selected coz insufficient balance.
- A1 A 05-Jan-2012 4 700.00 2700.00 700.00 This row will not be selected as serial 3 for A1 is not selected.
- A2 A 06-Jan-2012 1 100.00 2700.00 700.00 This row will be selected as output.
- A2 A 06-Jan-2012 2 200.00 2700.00 600.00 This row will be selected as output.
- A2 A 06-Jan-2012 2 500.00 2700.00 400.00 This row will not be selected coz insufficient balance.
- A3 A 07-Jan-2012 1 500.00 2700.00 400.00 This row will not be selected coz insufficient balance.
- A3 A 07-Jan-2012 2 700.00 2700.00 400.00 This row will not be selected coz insufficient balance.
- A3 A 07-Jan-2012 3 400.00 2700.00 400.00 This row will not be selected as serial 1 & 2 for A3 is not selected.
- B1 B 05-Jan-2012 1 1000.00 1100.00 1100.00 This row will be selected as output.
- B1 B 05-Jan-2012 2 1000.00 1100.00 100.00 This row will not be selected coz insufficient balance.
- B2 B 06-Jan-2012 1 100.00 1100.00 100.00 This row will be selected as output.
- B2 B 06-Jan-2012 2 100.00 1100.00 0.00 This row will not be selected coz insufficient balance.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement