Having the following table:
ID EmployeeID Status EffectiveDate
------------------------------------------------------
1 110545 Active 01AUG2011
2 110700 Active 05JAN2012
3 110060 Active 05JAN2012
4 110222 Active 30JUN2012
5 110545 Resigned 01JUL2012
6 110545 Active 12FEB2013
How do I get the number of active (or partially active) in a specific period?
For example, if I want to know all active (or partially active) employees from 01JAN2011
to 01AUG2012
I should get 4 (according to the table above). If I want to know all active employees from 01AUG2012
to 01JAN2013
it should be 3 only (because employee 110454 is resigned).
How will I do that?