很多人都在问这个问题,现在记录一下
select id from test as a where id = (select min(b.id ) from test as b where a.pid = b.pid);