日期:2014-05-16 浏览次数:20566 次
select * from tb a where exists (select 1 from ( select 姓名,max(时间)时间 from tb group by 姓名)b where a.姓名=b.姓名 and a.时间=b.时间)
select a.* from tb a where exists( select 1 from tb where 姓名=a.姓名 and a.id =max(id) group by 姓名)