I am trying to create a query to sum total gifts given by a certain person, but to add a flag on the individual gift when the total giving hits $500 (I don't need to sum past that).
I have the Persons ID, the gift size, and the gift date. for example:
ID gift_date gift_amt
--------- ----------- --------------
1 1/6/09 500
2 1/9/09 200
2 1/15/09 65
3 1/26/09 140
2 2/10/09 600
3 3/7/09 200
I would like a flag to be shown in my query for ID# 1 on the row with gift_date of 1/6/09, for ID#2 for gift date 2/10/09 and no flag for ID#3.