Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
i have the following problem.
I would like to make pairs of the following form:
Arrival | Stage | Departure |
02/11/2021 13:31:27 | 1. Process | 02/11/2021 14:11:38 |
02/11/2021 14:12:02 | 1. Process | 02/11/2021 14:12:03 |
02/11/2021 14:18:27 | 2 Distribucion | 02/11/2021 14:18:28 |
02/11/2021 14:50:42 | 1. Process | 02/11/2021 15:03:51 |
02/11/2021 15:10:41 | 2 Distribucion | 02/11/2021 15:10:42 |
pairs should be as follows:
Pair | Arrival | Stage | Departure |
1 | 02/11/2021 13:31:27 | 1. Process | 02/11/2021 14:11:38 |
1 | 02/11/2021 14:12:02 | 1. Process | 02/11/2021 14:12:03 |
1 | 02/11/2021 14:18:27 | 2 Distribucion | 02/11/2021 14:18:28 |
2 | 02/11/2021 14:50:42 | 1. Process | 02/11/2021 15:03:51 |
2 | 02/11/2021 15:10:41 | 2 Distribucion | 02/11/2021 15:10:42 |
Every time find a stage 2 Distribution before stage 1. Process a pair must be made
Thank you
alt(peek(pair),1)-(stage='1.process' and peek(stage)='2 distribution) as pair