What does the $skip stage do?
The $skip stage skips the given number of documents and passes on only the ones that follow them. It's the analog of OFFSET in SQL.
How it works
- receives a sorted or filtered stream of documents
- skips the specified number
- sends the rest to the next stage
Example
js
{ $skip: 20 }The first 20 documents are skipped, and processing continues from the 21st.
Where it's used
- pagination, together with
$limit - skipping technical data or the first records that aren't needed in the result
Summary
$skip is the stage that simply shifts the start of the dataset, removing the first N documents from further processing.
Short Answer
Interview readyPremium
A concise answer to help you respond confidently on this topic during an interview.