SQL 2 Columns of Different Types in Same Table - Working With 'Uknown' Amount
SELECT t1.*
FROM custOrders t1, custOrders t2 
WHERE t1.number_orders &lt; t2.number_orders 
  AND t2.name = 'x';


PS. custOrders.name must be defined as unique by according index.