If you don't mind, could we have a look at your query so that I can test it out on my own machine. Thanks!
How are you specifying the max and min times? As Eugene said, it would be great if we could have a look at your query so we can see what the problem might be.
In the absence of that, please consider trying the following syntax:
select value from piarchive..pimax where tag = 'sinusoid' and time >= 't1' and time < 't2' select value from piarchive..pimax where tag = 'sinusoid' and time between 't1' and 't2'
What is the PI OLEDB Provider version?
This sounds like known issue 113820 - starting 10-Nov-2014 specific queries into aggregation tables miss 1 row of data
The work around is to add extra second to the end-time parameter.
If the known issue doesn't apply in this case, please elaborate a bit more (ideally, provide example of the query + expected results + actual results). Thanks!