Domanda di colloquio di Tatvasoft

One easy coding question followed by SQL query