Domanda di colloquio di Grab

Three problems in codility. One sql, two standard algorithm problems.