Immensphere interview question

Reverse string, explain oops , few sql queries