Performing Calculations In A Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having difficulties establishing the following calculation within a
query -

- List of company names (may have duplicates)
- a number associated with each company

I need to create a query that removes duplicate company names to only unique
companies and the average of the duplicates.
Example - Company A, 1
Company A, 5
Company A, 3
It needs to return Company A,3 (The average from above)

Thanks in advance!
 
Try:
SELECT CompanyName, Avg([NumericField]) as TheAvg
FROM tblCompanies
GROUP BY CompanyName;
 

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

Back
Top