Consider the following Attendance table which contains an employee attendance record for a company:
EmployeeID (int), LoginTime (time), LogoutTime (time)
Which of these SELECT statements will list the employee ID that has logged-in most recently?
Correct Answer:
SELECT TOP 1 a.EmployeeID
FROM Attendance a
WHERE a.LoginTime = (SELECT MAX(b.LoginTime) FROM Attendance b)
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More SQL MCQ Questions