Immensphere Interview Question

Reverse string, explain oops , few sql queries