select first in and last out time - different date - from data finger
问题 Here is my data finger table, [dbo].[tFPLog] CardID Date Time TransactionCode 100 2020-09-01 08:00 IN 100 2020-09-01 17:00 OUT 100 2020-09-01 17:10 OUT 200 2020-09-01 16:00 IN 200 2020-09-02 02:00 OUT 200 2020-09-02 02:15 OUT 100 2020-09-02 07:00 IN 100 2020-09-02 16:00 OUT 200 2020-09-02 09:55 IN 200 2020-09-02 10:00 IN 200 2020-09-02 21:00 OUT Conditions Assume Employees will be IN and OUT in same day/next day. Assume There will be multiple IN and OUT for same day/next day for employees. So