select a.* from 表 a join(
  select id=min(id) from 表 group by type
)b on a.id=b.id