Sharing in physics after World War II
What is the approximate ratio of the number of laureates who won an unshared ({"share": "1"}
) prize in physics after World War II ({"year": {"$gte": "1945"}}
) to the number of laureates who won a shared prize in physics after World War II?
For reference, the code below determines the number of laureates who won a shared prize in physics before 1945.
db.laureates.count_documents({
"prizes": {"$elemMatch": {
"category": "physics",
"share": {"$ne": "1"},
"year": {"$lt": "1945"}}}})
Este exercício faz parte do curso
Introduction to MongoDB in Python
Exercício interativo prático
Transforme a teoria em ação com um de nossos exercícios interativos
