我在这里找到了解决方案: https://www.periscopedata.com/blog/4-ways-to-join-only-the-first-row-in-sql.html
select * from A a inner join (select * from B b where b.Aid in (select min(Aid) from B group by Aid) ) as b on b.Aid = a.id