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: SQL "Group By" question

Re: SQL "Group By" question

From: John Nelson <john_at_collectors_NOSPAM.com>
Date: Wed, 26 Aug 1998 01:34:31 GMT
Message-ID: <35e4648f.111225664@news.newsguy.com>


On 25 Aug 98 22:59:44 GMT, dolans_at_stripe.Colorado.EDU (Sean Dolan) wrote:

> 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

I've used something like this:

SELECT      TO_CHAR(date_open, 'Month'), 
                    COUNT(*) 
FROM          XYZ 

GROUP BY TO_CHAR(date_open, 'Month')

I'm not sure if this is the most efficient possible method, and would like to hear from some of the experts if there's a better way.

John Nelson Received on Tue Aug 25 1998 - 20:34:31 CDT

Original text of this message

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