Calculate duration between last timestamp and first timestamp

Hi,

Im using SQL management studio 18.

I am struggling to build a query that gives me the duration between the last dump of shift 1 and first dump of shift 2 and i will group it by equipment Ident.

Eg. I would need to know the time it took between last dump_end_timestamp of Dump_end_shift_ident (1) and First dump_end_timestamp of Dump_end_shift_ident (2) for Hauling_unit_ident HT807

1 Like