Ritual interview question

Window function SQL, 1 python