Crate Table Query - Closest to the 15th day.....


A

Ardy

Hello All:
I am having a heck of a time figuring this out….. I have table with bunchof wells, divided into two types Monthly and Quarterly, each well has several reads spanning over time(time series). I need to a query that can makea new table with all the reads that fall on or closest to the 15th of eachmonth. The kicker is that I need only one read if the type is Quarterly for each 3 months(the quarter) and 1 read for each month if the type is monthly(total of 3 read for the quarter). Can somebody help me on this? The example below is kind of showing this ……
Well_Num, Type, Read, Date
Well1, Monthly, 10.2, 1/1/2013
Well1, Monthly, 10.2, 1/2/2013
Well1, Monthly, 10.1, 1/20/2013
Well1, Monthly, 10.3, 2/10/2013
Well1, Monthly, 10.3, 2/16/2013
Well1, Monthly, 10.3, 3/1/2013
Well1, Monthly, 10.3, 3/15/2013
Well2, Quarterly, 9.1, 1/1/2013
Well2, Quarterly, 9.2, 1/5/2013
Well2, Quarterly,9.1, 2/2/2013
Well2, Quarterly,9.1, 2/15/2013
Well2, Quarterly,9.1, 3/2/2013
Well2, Quarterly,9.1, 3/18/2013

The resulting Table from the query should be

Well_Num, Type, Read, Date
Well1, Monthly, 10.1, 1/20/2013
Well1, Monthly, 10.3, 2/16/2013
Well1, Monthly, 10.3, 3/15/2013
Well2, Quarterly,9.1, 2/15/2013

Is this possible to achieve with Create Table Query
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top