Skip to content

Commit 25304b0

Browse files
authored
Update 3. Get Only What You Need, and Fast.md
1 parent 052321a commit 25304b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Introduction to MongoDB in Python/3. Get Only What You Need, and Fast.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,9 @@
77
### 📚 simple aggregation
88
![image](https://user-images.githubusercontent.com/51888893/204367355-6e6b185f-635c-4eee-839a-a8affb1d7759.png)
99

10+
## 🦍 Shares of the 1903 Prize in Physics
11+
You want to examine the laureates of the 1903 prize in physics and how they split the prize. Here is a query without projection:
12+
13+
db.laureates.find_one({"prizes": {"$elemMatch": {"category": "physics", "year": "1903"}}})
14+
15+
> Which projection(s) will fetch ***ONLY*** the laureates' full names and prize share info? I encourage you to experiment with the console and re-familiarize yourself with the structure of laureate collection documents.

0 commit comments

Comments
 (0)