Guest User

Untitled

a guest
Nov 21st, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. id LogOutTime
  2. ------------------------------
  3. 8563 2017-11-21 09:21:28.330
  4. 7961 2017-11-21 09:22:40.627
  5. 7961 2017-11-21 09:26:48.507
  6. 8563 2017-11-21 09:29:05.977
  7.  
  8. id LogOutTime
  9. ------------------------------
  10. 7961 2017-11-21 09:26:48.507
  11.  
  12. SELECT MAX(LogOutTime) AS MaxLogOut,
  13. id
  14. FROM table1
  15. GROUP BY wrkmh_assoc_id_emp
  16.  
  17. SELECT MIN(table2.MaxLogout)
  18. FROM (SELECT MAX(LogOutTime) AS MaxLogOut,
  19. id
  20. FROM table1
  21. GROUP BY wrkmh_assoc_id_emp) AS table2
Add Comment
Please, Sign In to add comment