Pipeline Practice

Rank the largest orders

Stages compose. Sort the full stream first, then limit what moves forward. Reversing the stages changes the answer.

Return the three highest-value orders, largest first.

Expected result: Orders o1004, o1010, and o1003.

Example pipeline syntax

[
  { $limit: 3 }
]