View Single Post
  #3  
Old January 27th, 2010, 10:01 PM posted to microsoft.public.access.queries
tighe
external usenet poster
 
Posts: 53
Default Count Number Of Employees for Month and Year historically

dorian,

thank you, but unless i am missing something for each month, i would have to
evaluate and requery to get my answer. i was hoping for answers like:
month/year:06/2007=5, 07/2007=9...12/2009=14.

"Dorian" wrote:

It depends on how you define 'the number of employees for each month'.
Do you measure at the start of the month or the end?
What do you want to do with an employee who starts and quits in the same
month?

SELECT COUNT(*)
FROM Employees
WHERE (TerminationDate AsOfDate OR TerminationDate IS NULL)
AND Approval_Date = AsOfDate;

AsOfDate is the date you are calculating from/to.
I assume Approval_Date is the hire date.

-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".


"tighe" wrote:

how i would i get the number of employees for each month and year that we
have data for?

my fields are :
Representative_Name
Approval_Date
Termination_Date

my data goes back to 06/2007. i can get how many person's were hired/fired
in a particular month/year in history but a total number of un-terminated
persons up to that month in history is eluding me. hope that makes sense.

AC2007/XP.