Hi , Welcome to justanswer.com
Can you share me sample table data ?
What is the PID ?
statusDate pid inPunch outPunch scanID sn
What are the above fields ?
statusDate = datetime of the ride this is in which format ?
Can you make a sample output data for a test PersonID
Can you please send me the required output for one individual ?
Yes thats what I am saying please provide me a just test data output for a specific ride ?
It seems the logic will take some time for me .
In the mean time I will open the question to other experts to help you more on this .