Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Help: how to group every 5 minutes?

Re: Help: how to group every 5 minutes?

From: Jonathan Gennick <jonathan_at_gennick.com>
Date: Tue, 17 Jul 2001 22:02:34 -0400
Message-ID: <6dr9lt85qmtcav45m76g2661imgeradp6c@4ax.com>

DATE values are stored to the second. You might be able to get the desired results by using TO_CHAR:

select entry_time, count(*)
from foo
group by to_char(entry_time,'yyyymmddhhmi');

Well, that would get you a grouping by the minute. You could probably work out some math on the minutes value that would get you to five minutes.

On Wed, 18 Jul 2001 01:43:22 GMT, dbadba62 <dbadba62_at_hotmail.com> wrote:

>select entry_time, count(*) from foo group by entry_time;
>
>it gives the results group by every seconds, could somebody tell me how
>to group by every 5 minutes?
Received on Tue Jul 17 2001 - 21:02:34 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US