Visa Inc. interview question

SQL Question on window functions