您想加入的事物是
select * from stuff where grp = 'a'和
select * from stuff where grp ='b'。因此,加入这些:
select a.ID as a, b.ID as b from (select * from stuff where grp = 'a') afull join (select * from stuff where grp = 'b') bon b.id = a.id
SQL小提琴
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)