The MongoDB Aggregation Framework | Chapter 2 - Basic Aggregation - Utility Stages Quiz Answer

The MongoDB Aggregation Framework  Chapter 2 - Basic Aggregation - Utility Stages Quiz Answer


The MongoDB Aggregation Framework Chapter 2 - Basic Aggregation - Utility Stages


In this article i am gone to share MongoDB-University Course: The MongoDB Aggregation Framework Chapter 2 - Basic Aggregation - Utility Stages Quiz Answer with you..



Lab: SUsing Cursor-like Stages

MongoDB has another movie night scheduled. This time, we polled employees for their favorite actress or actor, and got these results

favorites = [
  "Sandra Bullock",
  "Tom Hanks",
  "Julia Roberts",
  "Kevin Spacey",
  "George Clooney"]

For movies released in the USA with a tomatoes.viewer.rating greater than or equal to 3, calculate a new field called num_favs that represets how many favorites appear in the cast field of the movie.

Sort your results by num_favs, tomatoes.viewer.rating, and title, all in descending order.

What is the title of the 25th film in the aggregation result?
  • Recount
  • The Heat
  • Erin Brockovich
  • Wrestling Ernest Hemingway



Lab: Setting Up the Vagrant Environment

Calculate an average rating for each movie in our collection where English is an available language, the minimum imdb.rating is at least 1, the minimum imdb.votes is at least 1, and it was released in 1990 or after. You'll be required to rescale (or normalize) imdb.votes. The formula to rescale imdb.votes and calculate normalized_rating is included as a handout.

What film has the lowest normalized_rating?
  • DMZ
  • The Christmas Tree
  • Twilight
  • Avatar: The Last Airbender








Post a Comment

0 Comments