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;
 
Back
Top