move rownum column as first field for query with pagination