Count Distinct employees between two dates
I'm having a headache trying to figure this out and I can't seem to find the correct way of doing it. Any help would be greatly appreciated.
I'm needing to get a distinct number count of weekly employees by month that have worked or received pay for the pay period that includes the 12th of the month. The employees should only be counted once per month even though they might have worked and gotten paid during the pay period that includes the 12th of the month. I will give below the column names an example of the data.
emp no_
00001
pay type_
week
pay period start date_
01-09-12
pay period end date_
01-15-12
pay date_
01-12-12
work date_
01-11-12