Ver originalselect * from tabla_b as t1left join tabla_a as t2 on (t1.id=t2.id)where t2.id is not null