日期:2014-05-16 浏览次数:20592 次
select name,max(time) from tb group by name
select * from tb t where not exists(select 1 from tb where name=t.name and time>t.time)
select a.*
from tb a
inner join
(select name,
max([time]) 'maxtime'
from tb
group by name) b on a.name=b.name and a.[time]=b.maxtime