Re: Grouping Results In 5 Minute Increments

From: (wrong string) õder <tanel_at_altavista.kom>
Date: Tue, 15 May 2001 10:03:24 +0200
Message-ID: <3b00e29c$0$227$ba624cac_at_news.uninet.ee>


to_char(date, 'YYYYMMDD HH24:MI') is the function to get minutes out of dates.
to group by 5 minutes... i think you could use MOD-like function or smth..

Tanel
a DBA.

"Ted" <ted_at_nowhere.net> wrote in message news:WhVL6.952$6j3.88814_at_www.newsranger.com...
> I need to gather data in 5 minute clusters to perform a 5 minute average
 report.
> I've been trying to forulate a query using TRUNC and GROUP BY, but the
 problem
> I'm running into is that I can't figure out how to make TRUNC operate on
> intervals between minutes and hours. All I see in the documentation is
> TRUNC(somedate, 'HH') and TRUNC(somedate, 'MI'). I've tried dividing the
 trunc'd
> dates, but I get incompatible data type errors.
>
> I'm pretty new to PL/SQL and I'm sure this type of thing has been done
 before,
> but I'm pretty much at my wits end.
>
> Any help/advice would be appreciated.
>
> TIA!
>
> -----
> Ted
>
>
Received on Tue May 15 2001 - 10:03:24 CEST

Original text of this message