Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL "Group By" question
The following query should give you something close to what you want
select date_part, count(*) from (select trunc(date_open,'mon') date_part from XYZ) group by date_part;
Sean Dolan <dolans_at_stripe.Colorado.EDU> wrote in article
<dolans.904085984_at_stripe.Colorado.EDU>...
> I have a table called XYZ that has a column called date_open (which
naturally has the date in which the entry was entered into the table).
>
> I would like to create some sort of report/group by sql statement that
will return : July 10, August 23 In other words, a count will be done on
each month and will see how many calls were entered into the table. How
would this be done? I've tried thinking about the between, but couldn;t
figure how to show each month and its number of calls.
>
> Thanks for your help,
> Sean
>
Received on Wed Aug 26 1998 - 11:12:03 CDT