List:General Discussion« Previous MessageNext Message »
From:David Lindelöf Date:April 29 2006 12:12am
View as plain text  

Is there an easy way to get the last timestamped record not later than a
given date/time?

I record data for a scientific application and I do not sample my data
at a given, fixed frequency. Instead, whenever a physical value changes
beyond a given threshold, I get a new timestamped value which is stored
in the database.

For data analysis however it is more convenient to have a
regularly-spaced timeseries of that data. For instance, if I get
temperature measurements at 7:56, 8:02, 8:13 and 8:27, and would like a
timeseries 15-minutes apart (8:00, 8:15, 8:30), I would like MySQL to
automatically figure out that I need the measurements from 7:56, 8:13
and 8:27.

Any simple way to do that would be immensely appreciated.

Thanks in advance,
David Lindelöf
Station 18
1015 Lausanne
tel +41-21-693.5556
mob +41-79-415.6641
fax +41-21-693.2722
e-mail david.lindelof@stripped

"We came.  We saw.  We kicked its ass."
-- Bill Murray, _Ghostbusters_
TimeseriesDavid Lindelöf29 Apr
  • Re: TimeseriesDan Nelson29 Apr
  • Re: TimeseriesDavid Hillman1 May