Naaptol Interview Question

SQL renaming query