In a query, include your contract# and amount fields.
Create a new Calculated Field such as:
BaseContract: Left( str([YourContractField] ),5)
This will return a new (text) field which should match the base contract for all records (including those which are base contracts).
Now you should be...