| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Pascual Strømsnæs | Date: | October 6 2010 10:20am |
| Subject: | Constructing query to display item count based on increments of time | ||
| View as plain text | |||
Hi!
How would one go about to construct a query that counts items within an
increment or span of time, let's say increments of 10 minutes?
Imagine a simple table where each row has a timestamp, and the query
should return the count of items occurring within the timespan of a
defined period.
Say,
09:00: 14
09:10: 31
09:20: 25
09:30: 0
09:40: 12
etc.
I have been able to get collections of item occurrence based on month
and day by using GROUP BY together with a DATE_FORMAT( start_time, "%d
%m %Y" ) eg.
I can however not seem to be able to find the solution to grouping based
on the minute increments in my example above.
Any suggestions?
--
Kind regards
Pascual Strømsnæs
| Thread | ||
|---|---|---|
| • Constructing query to display item count based on increments of time | Pascual Strømsnæs | 6 Oct |
| • Re: Constructing query to display item count based on increments of time | Johan De Meersman | 6 Oct |
| • Re: Constructing query to display item count based on increments of time | Travis Ard | 6 Oct |
| • Re: Constructing query to display item count based on increments of time | Hank | 6 Oct |
| • Re: Constructing query to display item count based on increments of time | Johan De Meersman | 6 Oct |
| • Re: Constructing query to display item count based on increments of time | Hank | 6 Oct |
| • Re: Constructing query to display item count based on increments of time | Johan De Meersman | 7 Oct |
| • my.ini | Elim PDT | 7 Oct |
| • RE: my.ini | andrew.2.moore | 7 Oct |
| • Re: my.ini | Elim PDT | 7 Oct |
| • where clause | Elim PDT | 3 Jan |
