Collegedunia interview question

SQL query involving Windowing .