|
-
Apr 22nd, 2003, 07:44 PM
#1
Thread Starter
Fanatic Member
Average Order size
I have an Order table,
OrderID
OrderDate
blah blah
and an OrderItem table
ItemID
OrderID <-- foreign key
Product
Cost
Quantity
And i cant work out how to put the average order size on the report!, can anyone help, this must be a common thing...
any questions, please ask
Edit:
eg. ""SELECT AVG(orderSize) as avgOrderSize FROM (SELECT sum(Cost) as orderSize FROM OrderItem GROUP BY OrderID)"
gets me what i want
Last edited by SkiNLaB; Apr 22nd, 2003 at 07:49 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|