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 -> Simple ( I hope) SQL needed

Simple ( I hope) SQL needed

From: Sanjay Raj <rsanjaynj_at_yahoo.com>
Date: 17 Sep 2001 11:55:48 -0700
Message-ID: <9f767483.0109171055.5a0abcc3@posting.google.com>


I have table containing dates and order details Desc Order
OrderID,
ItemNo,
Date,
quantity,
total

The same order placed on the same day can have more than one item. I want a simple SQL query which will give me the number of orders of each item placed month wise. The date in the ORDER table is individual dates such as 01-JAN-01, 31-JAN-01, 05-MAR-01 etc. I want to know how may orders were placed by month. Say something like

Month     ItemNo          Number of Orders    Quantity
Jan       123             10                   100
Jan       321              5                   300
Feb       123              2                   80

....
...

Thanks for the help Received on Mon Sep 17 2001 - 13:55:48 CDT

Original text of this message

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