Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: count by month
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
![]() |
![]() |