SELECT * FROM tablea WHERE (number NOT IN (SELECT ta.number FROM tablea AS ta INNER JOIN tablea AS tb ON ta.number = tb.number AND ta.id tb.id))