Naaptol interview question

SQL renaming query