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: Ian Ledzion <ian.ledzion_at_lgxbow.com>
Date: Mon, 3 Sep 2001 15:19:38 +0200
Message-ID: <9mvvv6$ksi$1@rex.ip-plus.net>


I'd be more inclined to use TRUNC. It returns date values which you can then manipulate as you want.

"Dario Bilic" <dario_bilic_at_yahoo.com> wrote in message news:9mldgd$doqn$1_at_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 Mon Sep 03 2001 - 08:19:38 CDT

Original text of this message

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