What is the question? Are you trying to figure out what the previous pension amount is? Your tables don't seem to contain the information you would need. Also, we don't know any of your business rules so you might want to start with those rather than making us try to guess. For example, Are the increases ALWAYS on an annual basis or could they happen mid year? Even if the answer is always annual, you should probably consider using a start date even if it is always Jan 01, someyear. That way if there is a cost of living increase midyear, you can accommodate the change by using May 01, someyear for example.