Oracle Interview Question

Any sorting logic we need to implement