Question d’entretien chez Amazon

SQL medium hard question and a simple reverse a sentence string.