A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

summarize data in access 2007



 
 
Thread Tools Display Modes
  #1  
Old February 19th, 2010, 07:47 PM posted to microsoft.public.access.queries
helpme!
external usenet poster
 
Posts: 16
Default summarize data in access 2007

I have a EmployeeInfo table with 1000 records. Each employee has an
autonumber EmployeeID field. Within that same table there are 117
supervisors, identified in the SupName field. I would like to summarize the
count of EmployeeID by SupName. I have no idea where to begin... Please let
me know if you need more info.
Thanks all!
  #2  
Old February 19th, 2010, 08:05 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default summarize data in access 2007

SELECT SupName, Count(EmployeeID)
FROM EmployeeInfo
GROUP BY SupName
ORDER BY SupName ;

Open a new query but don't add any tables. Go to View, SQL View and past in
the above.

As a side note: Assuming that the Supervisor is in the EmployeeInfo table as
an employee, you shouldn't have a name in the SupName field. Instead you
should have the EmployeeID of the supervisor there. Then you could do a self
join on the table. Why? Here's just one example: A Supervisor changes their
name, like getting married or something. With your setup you would need to
change the supervisor's name in their employee record AND for each employee
where they are the supervisor. If you did it by EmployeeID in the SupName (or
better yet SupID) field, you would only need to change it in one place.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"HelpMe!" wrote:

I have a EmployeeInfo table with 1000 records. Each employee has an
autonumber EmployeeID field. Within that same table there are 117
supervisors, identified in the SupName field. I would like to summarize the
count of EmployeeID by SupName. I have no idea where to begin... Please let
me know if you need more info.
Thanks all!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.