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: SQL help needed

Re: SQL help needed

From: Michel Cadot <micadot_at_netcourrier.com>
Date: 2000/04/25
Message-ID: <8e48n6$er5$1@news3.isdnet.net>#1/1

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...

> 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
Received on Tue Apr 25 2000 - 00:00:00 CDT

Original text of this message

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