select X.a,Y.m,Z.m from A x inner join B y on y.l = X.e inner join B z on z.l = X.f
select a.a,b.m,c.m from a join b on a.e=b.l join b as c on a.f=c.l
selex X.a,Y.m,Z.m from A X inner join B Y on Y.l = X.e inner join Z on Z.l = X.f
selex X.a,Y.m,Z.m from A X inner join B Y on Y.l = X.e inner join B Z on Z.l = X.f
select A.a,B1.m,B2.m from ta A left join tb B1 on A.e=B1.l and A.e=B1.m left join tb B2 on A.f=B2.l and A.f=B2.m where (B1.l is not null and B1.m is not null) or (B2.l is not null and B2.m is not null)
from a join b on a.e = b.l and a.f = b.m
from A x inner join B y on y.l = X.e
inner join B z on z.l = X.f
from a
join b on a.e=b.l
join b as c on a.f=c.l
from A X inner join B Y on Y.l = X.e
inner join Z on Z.l = X.f
from A X inner join B Y on Y.l = X.e
inner join B Z on Z.l = X.f
select A.a,B1.m,B2.m
from ta A
left join tb B1 on A.e=B1.l and A.e=B1.m
left join tb B2 on A.f=B2.l and A.f=B2.m
where (B1.l is not null and B1.m is not null)
or (B2.l is not null and B2.m is not null)