Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL help needed
select to_char(trunc(date_col, 'HH24'), 'MM-DD-YYYY HH24:MI'),
count(*) from tab
group by trunc(date_col, 'HH24')
/
-- Have a nice day Michel NeilC <neil-olos_at_NOSPAMbt.com> a écrit dans le message : 39059EB8.7301820A_at_NOSPAMbt.com...Received on Tue Apr 25 2000 - 00:00:00 CDT
> Hi
>
> I have a column of type date in a table, and I want to be able to
> produce a report showing the number of records for each hour - any body
> able to help ?
>
> output would look something like
>
> 01:00 10
> 02:00 6
> 03:00 5
> .
> .
> .
> 23:00 132
> 00:00 99
>
> Many thanks in advance
>
> Neil