Pregunta de entrevista de Amazon

Writing queries with window functions.