Hi,
You need to use self join with this table as below:
SELECT EmpIN.EmpCode,
EmpIn.EmpName,
EmpIn.FirstIN,
EmpOut.LastOut
FROM (SELECT EmpCode,
EmpName,
aDate,
MIN(aTime) AS [FirstIN]
FROM tblINOUT
GROUP BY EmpCode,EmpName, aDate) AS EmpIN
LEFT OUTER JOIN
(SELECT EmpCode,
EmpName,
aDate,
MAX(aTime) AS [LastOut]
FROM tblINOUT
GROUP BY EmpCode,,EmpName, aDate) AS EmpOUT
ON EmpIN.EmpCode = EmpOUT.EmpCode
AND EmpIN.aDate = EmpOUT.aDate;