Pregunta de entrevista de AT&T

Easy SQL and coding question for OA round.