I have a table of data that includes monthly oil production totals. Sometimes a total for a given month will be revised many months later. For example, I may submit a report in March of 2010 stating my total for January of 2010 was 150 barrels from the NB-CD formation. Then, in August of 2011, I may revise my March calculations and say that there were actually 250 barrels produced from NB-CD in January of 2010. When this happens, I include a "Y" in the "revised" column of the record containing the new number, indicating that the new record should replace the old record. I have included a snippet of the table here for reference: http://databin.pudo.org/t/5c2b3f
API Sequence No = well number
Revised = the revised (newer) record
Accepted date = date the report showing the production totals was accepted
Formation = formation from which oil was produced
How would I query totals for a given month/year? It is necessary to exclude any records that were subsequently revised. For example, the total for March of 2012 would be 884 (865 from NB-CD and 19 from JSND). Total for May would be 656 (628 from NB-CD and 28 from JSND).