SELECT ID, Checktime, Checktype
FROM (SELECT ID,Checktime as Date_IN,Checktype as CheckIn
FROM OT
WHERE Checktype='I') AS TimeIN
Left join
(SELECT ID as Emp_Out_ID,Checktime as Date_Out,Checktype as CheckOut
From OT
Where Checktype="O"
group by Emp_Out_ID) as [TimeOut]
on (TimeIN.ID <> TimeOut.Emp_Out_ID
and TimeIN.ID = TimeOut.Emp_Out_ID
group by ID;
結果を除外しようとしています
ここで何が間違っていますか?