Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: group by hour?
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
![]() |
![]() |