34,837
社区成员




select * from tb where not exists(select 1 from tb where name=t.name and logintime>t.logintime)
select b.* from
(select distinct name from tb) a
cross apply
(select top(1) * from tb where name = a.name order by logintime desc) b
select * from tb a
where not exists(select 1 from tb where name = a.name and logintime > a.logintime)