Professional Documents
Culture Documents
TD2_Mongo
1) db.publis.find({"type" : "Book"});
2) db.publis.find({$or: [{"type" : "Book"},{"type" :
"Phd"}]});
3) db.publis.find({year : {$gte : 2011}});
4) db.publis.find({"type" : "Book", year : {$gte : 2014}});
5) db.publis.find({authors : "Toru Ishida"});
6) db.publis.distinct("publisher");
7) db.publis.distinct("authors");
8) db.publis.aggregate([{$match:{authors : "Toru
Ishida"}}, { $sort : { booktitle : 1, "pages.start" : 1 } }]);
9) db.publis.aggregate([{$match:{authors : "Toru
Ishida"}}, {$sort : { booktitle : 1, "pages.start" : 1 }},
{$project : {title : 1, pages : 1}}]);
Houssem Jabally 3BI A03