You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
293 B
Plaintext

// OR
db.books.find( { $or: [{year: {$lte: 2008}}, {year: {$eq: 2016}}]} )
// AND
db.books.find( { $and: [{year: {$eq: 2008}}, {category: {$eq: "Fiction"}}]} )
// NOT
db.books.find( {$not: {year: {$eq: 2016} }})
// NOR
db.books.find( { $nor: [{year: {$lte: 2008}}, {year: {$eq: 2016}}]} )