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