i have a situation where i must count the number of month an employee is active in a year :
Example 1: from Jan to May Active, June to July on leave, August to Sept
Active, so 7 months
Example 2: from Jan to May Active, from June to Sept Terminated..so 5
Months
or the employee can be active at any moment in the year and i must count it all.
can you help me in writing this sql?
thks
Example 1: from Jan to May Active, June to July on leave, August to Sept
Active, so 7 months
Example 2: from Jan to May Active, from June to Sept Terminated..so 5
Months
or the employee can be active at any moment in the year and i must count it all.
can you help me in writing this sql?
thks