MongoDB Query Language (MQL) Logical Query Operators
Logical query operators combine multiple query conditions using logical operations. These operators enable you to construct complex queries by joining conditions with AND, OR, NOT, and NOR operations, allowing for sophisticated document filtering based on multiple criteria.
$and
The $and operator joins multiple query clauses and returns documents that match all specified conditions.
$nor
The $nor operator performs a logical NOR on an array of expressions and retrieves documents that fail all the conditions.
$not
The $not operator performs a logical NOT operation on a specified expression, selecting documents that don't match the expression.
$or
The $or operator joins query clauses with a logical OR and returns documents that match at least one of the specified conditions.