Results 1 to 7 of 7

Thread: Average Order size

Threaded View

  1. #1

    Thread Starter
    Fanatic Member SkiNLaB's Avatar
    Join Date
    Jan 2002
    Location
    Sydney, Australia
    Posts
    747

    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
  •  



Click Here to Expand Forum to Full Width