SELECT A,B,C FROM tabel1 where (tabel1.D,tabel1.E) in (SELECT tabel2.A,tabel2.B FROM tabel2 WHERE tabel2.Z);
We can give multiple conditions to the WHERE condition, then we can extract matching records only.