Ans - 2
Lets divide the queries in to Q1 U Q2
Q1 Select students who have not more than 3 students with cpi '>=' theirs
Q2 Select students who have cpi > ALL(subQ2). Similar to Q1 subQ2 selects students who have not more than 5 students with cpi '>=' theirs
Q1 outputs Dilip and Pallab
subQ2 outputs Dilip, Pallab, Deepak and Sourav. So, Q2 outputs empty as none have cpi greater than Dilip(not even himself)
So, result = 2 rows union phi. no intersection. So, ans is 2.
This(http://sqlfiddle.com/#!9/95e5e/7) might help to understand the chunking. Try deleting part of query and running