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

Home -> Community -> Usenet -> c.d.o.misc -> Re: group by hour?

Re: group by hour?

From: Chrysalis <cellis_at_iol.ie>
Date: 1997/04/13
Message-ID: <3350C263.4F9F@iol.ie>#1/1

edwards_at_garland.dnr.state.sc.us wrote:
>
> is it possible to group by the hour or day of a date?
>
> select avg(temperature),date from weather
> group by date%DAY
>
> Does anyone know how to do this?

select to_char(<date_column>,'dd-Mon-yyyy hh24'),avg(temperature) from ...
group by to_char(date_column,'dd-Mon-yyyy hh24');

Chrysalis. Received on Sun Apr 13 1997 - 00:00:00 CDT

Original text of this message

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