I have cases table with _CASE_KEY and OPERATION NUMBER. Each _CASE_KEY can have N operations. For ex:
_CASE_KEY: 01000200
- OPERATION 0001
- OPERATION 0100
- OPERATION 0500
- OPERATION 0700 (etc)
_CASE_KEY: 03000200
- OPERATION 0001
- OPERATION 0100
- OPERATION 0500
- OPERATION 0700 (etc)
The goal is to calculate the time it takes from last operation of a case to first operation of the next case. In the example above, it would be time difference between the _CASE_KEY 01000200, OPERATION 0700 to _CASE_KEY 03000200, OPERATION 0001. I am trying to use the PU_FIRST and PU_LAST to accomplish this goal but unfortunately it is NOT giving me what I am looking for. Any help would be appreciated. I do have the ACTIVITIES table where all of these operations that I've mentioned above are shown.