Last active
November 27, 2023 20:03
-
-
Save atilara/2f8a9e5945e0b8e435b439ad832ad477 to your computer and use it in GitHub Desktop.
bdnc-mongodb-workshop-answers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Encontrar propriedades que aceitam animais de estimação | |
db.collection.find({ "amenities": "Pets allowed" }) | |
// Encontrar propriedades com um preço inferior a 100.00 | |
db.collection.find({ "price": { $lt: 100.00 } }) | |
// Listar propriedades localizadas no RJ com uma pontuação de avaliação superior a 9 | |
db.collection.find({ | |
"address.market": "Rio De Janeiro", | |
"review_scores.review_scores_value": { | |
$gt: 9 | |
} | |
}) | |
// Encontrar propriedades onde não seja permitido fumar | |
db.collection.find({ "amenities": { $nin: ["Smoking allowed"]}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment