Pregunta de entrevista de American Express

basic sql windows function questions, 3 jar + hourglass puzzle