delete t1, t2 from exp_members t1 join table2 t2 on t1.member_id = t2.member_id where t1.email LIKE '%.pl'