按某字段去重 select * from tablename as a where not exists ( select 1 from tablename as b where b.name=a.name and b.id>a.id) name为去重的字段,可以有多个字段