Pergunta de entrevista da empresa IBM

Reverse of string. query to join two tables