Jay,
-------------------------------------------------------------------
|You could select and group by the modulo of the seconds of each|
|date and get your nice groupings very simply. If you can write a |
|user defined function in whatever language you're using |
|you might try that. |
-------------------------------------------------------------------
How would you do that in C?


----- Original Message ----- From: "Jay" <[EMAIL PROTECTED]>
To: <sqlite-users@sqlite.org>; <[EMAIL PROTECTED]>
Sent: Tuesday, February 22, 2005 2:00 AM
Subject: Re: [sqlite] tricky date time problem




--- Lloyd Thomas <[EMAIL PROTECTED]> wrote:

I have a query which calculates the number of events during an hour
by the
minute.  It needs to work out which minute has the most events and
the
average events during that hour. So it should return an array of  60
results
for an hour where I can use the MAX() feature in php to find the peak

It's too bad Sqlite doesn't have the modulo operator, you could select and group by the modulo of the seconds of each date and get your nice groupings very simply. If you can write a user defined function in whatever language you're using you might try that.



__________________________________
Do you Yahoo!?
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com



Reply via email to