Amazon interview question

SQL pseudo code asked on Use of SQL windows function