Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Aggregate function

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Is there a way of performing an aggregate function of another aggregate function?
e.g. finding the average of a group a averages
 
Run your aggregate query to get averages along your variables, then run a second query off the first.
ie:
First Query - Find the average dollar amount per order by customer.
Second Query - Link into the first query and aggregate the average between cusomers.
Keep in mind, in this example, you are not getting a straight average of order size for your company, you are getting your customer average order size. It doesn't matter how many times a customer ordered from you; each customer is counted just once in your average. If you just run one query averaging all your orders, the average you come up with will probably different.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top