select * from 表 t
where not exists(select 1 from 表 where [|name]=t.name and id>t.id)
order by id desc