1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to MongoDB in Python

Exercise

How many prizes were awarded to immigrants?

How many prizes were awarded to people who had no affiliation in their country of birth at the time of the award?

Instructions

100 XP
  • In your aggregation pipeline pipeline, use the "gender" field to limit results to people (that is, not organizations).
  • Count prizes for which the laureate's "bornCountry" is not also the "country" of any of their affiliations for the prize. Be sure to use field paths (precede a field name with "$") when appropriate.