Aggregation task - $skip

A scope aggregation task that skips the specified number of documents in the result set

The $skip task allows to page through results by specifying an offset.

Syntax diagram

Read syntax diagramSkip visual syntax diagram{$skip:offset}

Command arguments

offset
An integer number to specify the number of documents that are skipped

Example

To skip the first three documents in the books collection, run the following command:

db.books.aggregate({"$skip": 3})