G
Guest
Hello.. I have a table that keeps the jobs worked on daily by employees,
meaning the employee id may appear more than once each day. I have created
the following code in a query to give me the unique count of employees who
worked during the month:
SELECT Count([Employee]) AS [# of Employees] FROM (SELECT DISTINCT
[Employee] FROM [Job_Time] WHERE Year([WorkDate]) = Year(Date()) AND
Month([WorkDate]) = Month(Date()))
This works fine for the current month, however, I need to produce a month by
month count for the past three years. Any suggestions?
meaning the employee id may appear more than once each day. I have created
the following code in a query to give me the unique count of employees who
worked during the month:
SELECT Count([Employee]) AS [# of Employees] FROM (SELECT DISTINCT
[Employee] FROM [Job_Time] WHERE Year([WorkDate]) = Year(Date()) AND
Month([WorkDate]) = Month(Date()))
This works fine for the current month, however, I need to produce a month by
month count for the past three years. Any suggestions?