Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- id LogOutTime
- ------------------------------
- 8563 2017-11-21 09:21:28.330
- 7961 2017-11-21 09:22:40.627
- 7961 2017-11-21 09:26:48.507
- 8563 2017-11-21 09:29:05.977
- id LogOutTime
- ------------------------------
- 7961 2017-11-21 09:26:48.507
- SELECT MAX(LogOutTime) AS MaxLogOut,
- id
- FROM table1
- GROUP BY wrkmh_assoc_id_emp
- SELECT MIN(table2.MaxLogout)
- FROM (SELECT MAX(LogOutTime) AS MaxLogOut,
- id
- FROM table1
- GROUP BY wrkmh_assoc_id_emp) AS table2
Add Comment
Please, Sign In to add comment