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: count by month

Re: count by month

From: Galen Boyer <galenboyer_at_hotpop.com>
Date: 30 Aug 2001 08:30:27 -0500
Message-ID: <upu9dy0ht.fsf@verizon.net>


On 30 Aug 2001, bthomas_at_trey-industries.com wrote:

> I have a table that has
>
> sale (number)
> saledate (date)
>
> --------------------------------
>
> I want to write a query that will count the sales by month and
> return
>
> sale saledate
> 12 Januray
> 33 February
> 2 March
>
>
> is there a way to do that on Oralce 7.3?

This is pretty basic SQL and it has nothing to do with any version of Oracle. You should be able to do this on any database. I'm guessing trey-industries isn't a company and you are working on a school assignment?

The answer involves an aggregation function and a group by clause.

-- 
Galen Boyer
It seems to me, I remember every single thing I know.
Received on Thu Aug 30 2001 - 08:30:27 CDT

Original text of this message

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