Sum by group

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

Guest

I wish to sum the total employment for mulitple locations of each company.
The database has hundreds of different companies. How can I group each
company by name, and then calculate the employment sum for each company?
Thank you.
 
Try a query with this SQL view.

Select [company], Sum([employment]) as SumEmployment
FROM [mulitple locations]
Group By [company];
 
Thank you. It worked.

One more question. After the total employment is calculated for each
company, I wish to attach that number to a company location in a report based
upon two other criteria - incorporation and type of company - and provide the
address etc. The use of multiple queries is not producing the desired
results. Any suggestions?



Duane Hookom said:
Try a query with this SQL view.

Select [company], Sum([employment]) as SumEmployment
FROM [mulitple locations]
Group By [company];

--
Duane Hookom
MS Access MVP
--

Bill said:
I wish to sum the total employment for mulitple locations of each company.
The database has hundreds of different companies. How can I group each
company by name, and then calculate the employment sum for each company?
Thank you.
 
My suggestion is to identify how Company location is related to company and
then what the criteria has to do with anything.

If you have something that isn't working, it doesn't do any good if you
don't"
1) describe what you have (possibly a SQL view)
2) tell us why it is not producing the desired result.

--
Duane Hookom
MS Access MVP
--

Bill said:
Thank you. It worked.

One more question. After the total employment is calculated for each
company, I wish to attach that number to a company location in a report
based
upon two other criteria - incorporation and type of company - and provide
the
address etc. The use of multiple queries is not producing the desired
results. Any suggestions?



Duane Hookom said:
Try a query with this SQL view.

Select [company], Sum([employment]) as SumEmployment
FROM [mulitple locations]
Group By [company];

--
Duane Hookom
MS Access MVP
--

Bill said:
I wish to sum the total employment for mulitple locations of each
company.
The database has hundreds of different companies. How can I group each
company by name, and then calculate the employment sum for each
company?
Thank you.
 
Back
Top