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: Dario Bilic <dario_bilic_at_yahoo.com>
Date: Thu, 30 Aug 2001 15:02:23 +0200
Message-ID: <9mldgd$doqn$1@as201.hinet.hr>


Hi Ben,

Try this query:

SELECT TO_CHAR(SALEDATE,'MM') AS SALEDATE, COUNT(1) AS SALE FROM table_name
GROUP BY TO_CHAR(SALEDATE,'MM'); Dario

"Ben" <bthomas_at_trey-industries.com> wrote in message news:991ee5b0.0108300414.d6f2e31_at_posting.google.com...
> 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?
Received on Thu Aug 30 2001 - 08:02:23 CDT

Original text of this message

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