Oracle Interview Question

DSA Sheet question of removing duplicates