SELECT ROWNUM, a.* FROM (SELECT customers.* FROM customers WHERE customer_id > 4500 ORDER BY last_name) a;