Collegedunia Interview Question

SQL query involving Windowing .