AllianceBernstein interview question

Window function for sql part of the interview