Dear Experts,
I am stuck with the below issues. Pls help.
The below example shows the leave records for an employee id 31750. We need to calculate the leave duration. Here EMPL_STATUS='LEAVE' indicates leave and 'ACTIVE' indicates the active status of the employee. If you see the data, there are 3 leave periods showing in the below table which we need to capture by writing SQL.
If you see the data from bottom to top,
leave starts from 1/1/2009 (status='LEAVE') and ends on 1/23/2009 (status='ACTIVE').
↧