MotionQL

MongoDB operators cheat sheet

Searchable reference of MongoDB query, update and aggregation operators and pipeline stages, each with example syntax and a link to the official documentation.

Free, no sign-up. Search runs in your browser and nothing you type is sent to any server.

214 operators

Query · Comparison

Query · Logical

Query · Element

Query · Evaluation

Query · Array

Query · Geospatial

Query · Bitwise

Update · Fields

Update · Arrays

Aggregation stage · Stages

Aggregation expression · Arithmetic

Aggregation expression · Array

Aggregation expression · Comparison and boolean

Aggregation expression · Conditional

Aggregation expression · String

Aggregation expression · Date

Aggregation expression · Type

Aggregation expression · Object, set and variables

Accumulator · $group accumulators

Window · $setWindowFields operators

Do this against your real data with MotionQL

MotionQL's aggregation editor previews every stage as you build it, with the full operator library and templates. Pro is free for a year.

FAQ

Questions, answered

Query operators such as $gt and $in go in a find filter or a $match stage, written as { field: { $gt: 5 } }. Aggregation expression operators work on values inside pipeline stages, written as { $gt: ["$field", 5] }. Use $expr to use an aggregation expression in a query, for example to compare two fields.

More free MongoDB tools