Forum Discussion

BYENER's avatar
BYENER
Icon for Helper V rankHelper V
6 years ago

Group by criteria

Hi,

 

Can someone help me? I have a table with start and end timestamp per processtep per operator. I grouped this data, but the issue is when a operator switched from processtep to another processtep and later back to the first processtep then the group by function take the first time and the last. I need the last time before the operator switch to another processtep. See below 

 

Operator (operator_id) 2828 started at 08:37:54 with processstep_id 1060. At 09:41:13 he switched to processtep 1073 and at 09:50:05 back to the first processtep 1060. When I group this data I would like to see the next:

 

Start: 08:37:54 End: 09:36:56 Processtep_id: 1060 Operator: 2828

Start: 09:41:13 End: 09:42:36 Processtep_id: 1073 Operator: 2828

Start: 09:50:05 End: 09:53:02 Processtep_id: 1060 Operator: 2828

 

3 Replies