M220P - Final: Question 7

Is it possible that none of the answers are correct for Final: Question 7 ?

each query sorts all of the documents by “height” in descending order (for all choices)
therefore none of the skip / limit combinations come back with the correct answer.

Why not?

“find only the 4th- and 5th-tallest people…”

To reach the fourth and fifth highest, how many would you have to jump?
Having to list two, that is, the fourth and fifth, what would be the limit?

That works if the list is sorted in ‘ascending’ order… skip 3 and limit it to 2 results.

but when the list is sorted in descending order it only works if there are exactly 8 people in the list (no more or no less)

Try this in the mflix movies…

Hi @jsherard,

I think you don’t understand the question at all.

Sorting in descending order is necesary, the 1st tallest will be the higuest number(first element after sorting in this direction), 2nd tallest will be second element and so on until 4th and 5th elements, so you dont need 8 people to get requested results.

Regards,
Antonio

Thanks! I understand now.