This commit is contained in:
2025-10-23 16:18:37 +02:00
parent 42099921cb
commit 908987f405
2 changed files with 6 additions and 6 deletions

View File

@@ -38,13 +38,13 @@ db.restaurants.find();
db.restaurants.find({},{restaurant_id:1, name:1, borough:1, cuisine:1});
```
### Q4 Afficher les 5 premiers documents de la collection restaurants. Utiliser la projection de Q3
4. Afficher les 5 premiers documents de la collection restaurants. Utiliser la projection de Q3
```javascript
db.restaurants.find({},{restaurant_id:1, name:1, borough:1, cuisine:1})().limit(5);
```
### Q5 Afficher la liste des boroughs
5. Afficher la liste des quartiers (boroughs)
```javascript
db.restaurants.distinct("borough")