AVG TOP 5 Query

  • Thread starter Thread starter AJ
  • Start date Start date
A

AJ

Can you do a select and get the avgerage of the top 5 values?

example - select top 5 AVG(sales) from table_1?

This seems to still do an average of ALL the rows.

Thanks a ton.
AJ
 
AJ said:
Can you do a select and get the avgerage of the top 5 values?

example - select top 5 AVG(sales) from table_1?

This seems to still do an average of ALL the rows.

Thanks a ton.
AJ

Write a queryto return the Top 5 values. Use that query as the source for
the aggregate query to get the average.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

select top 5 1
Calculate Average without outliers 2
Select Top with aggregate function 1
count question 3
Average of a Date Field 2
Avg expression in a query 4
Avg in a query 3
Run-Time Error '6' 2

Back
Top