Hi All, I wonder if you can help me here?
I am a novice SQL user and need some guidance on how to sort a time/ date query out.
my query is:
SELECT
client_id,
code,
to_loc_id,
pallet_id,
Min (dstamp) AS First,
Max (dstamp) AS Last
FROM inventory_transaction
WHERE Pallet_id ='450218970030400074'
AND Client_id = 'DIV'
AND Code = 'Pick'
AND to_loc_id = 'CONTAINER'
group BY client_id,code,to_loc_id,pallet_id
result:

I need to calculate the time difference between the first and last.
how do I go about this?