我有一个如下表:
id website logInTime
1 Yahoo 1/1/2001 00:00:00
2 Google 1/1/2001 00:00:01
1 Yahoo 2/1/2014 00:00:00
2 Yahoo 2/1/2014 00:00:00
如何根据网站从每个用户获取最新的登录时间?
select t.id, t.website, max(logInTime)
from table t
group by t.id, t.website
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句