Exam C100DEV Topic 1 Question 90 Discussion

Actual exam question for MongoDB's C100DEV exam
Question #: 90
Topic #: 1
In your database there is a movies collection with the following document structure: { _id: ObjectId("573a1390f29313caabcd42e8"), genres: [ 'Short', 'Western' ], title: 'The Great Train Robbery', rated: 'TV-G', year: 1903, imdb: { rating: 7.4, votes: 9847, id: 439 }, countries: [ 'USA' ] }, { _id: ObjectId("573a1390f29313caabcd4323"), genres: [ 'Short', 'Drama', 'Fantasy' ], rated: 'UNRATED', title: 'The Land Beyond the Sunset', year: 1912, imdb: { rating: 7.1, votes: 448, id: 488 }, countries: [ 'USA' ] }, { _id: ObjectId("573a1390f29313caabcd446f"), genres: [ 'Short', 'Drama' ], title: 'A Corner in Wheat', rated: 'G', year: 1909, imdb: { rating: 6.6, votes: 1375, id: 832 }, countries: [ 'USA' ] } How can you group these documents to extract the distribution of rated field?

Suggested Answer: B Vote an answer

https://docs.mongodb.com/manual/reference/method/db.collection.aggregate/

by Tom at Nov 26, 2024, 06:35 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10