Hi guys,
I have data like below with a list of employees, applications, status and dates.
I would like to derive for each empl_i, appt_n and status I would like to get the Minimum efft_d, the problem is some of the statuses may come back with the same employee and application.
I have a problem creating the gaps and island and would like to get the expected output as per below.
Any help would be greatly appreciated.
Thanks.
I have data like below with a list of employees, applications, status and dates.
Code:
EMPL_I APPT_N STUS_C EFFT_D
123 001 NEW 2023-10-02
123 001 NEW 2023-10-09
123 001 DEFER 2023-10-09
123 001 DEFER 2023-10-10
234 001 APPROVED 2023-10-10
234 001 APPROVED 2023-10-11
123 001 APPROVED - YES 2023-10-11
123 001 APPROVED - YES 2023-10-16
123 001 NEW 2023-10-16
123 001 APPROVED 2023-10-16
123 001 APPROVED - YES 2023-10-16
123 001 APPROVED - YES 2023-10-27
123 001 NOT PROCEED 2023-10-27
I would like to derive for each empl_i, appt_n and status I would like to get the Minimum efft_d, the problem is some of the statuses may come back with the same employee and application.
I have a problem creating the gaps and island and would like to get the expected output as per below.
Code:
EMPL_I APPT_N STUS_C EFFT_D
123 001 NEW 2023-10-02
123 001 DEFER 2023-10-09
234 001 APPROVED 2023-10-10
123 001 APPROVED - YES 2023-10-11
123 001 NEW 2023-10-16
123 001 APPROVED 2023-10-16
123 001 APPROVED - YES 2023-10-16
123 001 NOT PROCEED 2023-10-27
Any help would be greatly appreciated.
Thanks.