Pregunta de entrevista de Sheetz

Typical Hackerrank medium SQL question for OA