select t1.colA from temp_1 t1 inner join temp_4 t4 on t1.colA = t4.colA and t1.colB = t4.colB and t1.colC = t4.colC and t1.colD = t4.colD; ...