Have a table with chronological data that has 2 unique fields which can create subgroups.
Those fields are "FundNo" & "AccountNo" which are sorted (ascending) by date.

1. I want to create a counter or autonumber that IDs each record within the subgroup chronologically. Therefore the counter / autonumber needs to reset to 1 with each change in "FundNo" & "AccountNo". I will subsequently be filtering out / excluding certain records, say the first 4 or 5. My thought is if the autonumber / counter field is <=4 then I can eliminate the first 4 records per group and work with the remaining records.

2. I want to create a running sum / balance for "Amount" within each group to be able to filter out certain records. For example the first 4 or 5 records of each group (these records would also be in a chronological order).

Sample Table

FundNo AccountNo Date Amount
01 21 01/01/2000 $10
01 21 01/02/2000 $15
02 21 01/01/2000 $20
02 22 01/15/2000 $25

I was looking to create expressions in query filters, but if creating a function or some other method is easier, please advise &/or ask for additional details.

Thanks for the help in advance.