Different states might have the same city name. You will need to probably change your projection to send more info through than just that first character. Don’t include their quiz scores in the calculation. To be clear, each student’s average includes only exams and homework grades. You need to group twice to solve this problem. A city might have multiple zip codes.

Now use the aggregation framework to calculate the author with the greatest number of comments. Check all that apply. You need to group twice to solve this problem. For example, to extract the first character from the city field, you could write this pipeline:. You will be using the zip code collection data set, which you will find in the ‘handouts’ link in this page. Using the aggregation framework, calculate the sum total of people who are living in a zip code where the city starts with one of those possible first characters.

Import it into your mongod using the following command from the command line:. Now use the aggregation framework to calculate the author with the greatest number of comments. In this problem you will calculate the number of people who mnogodb in a zip code in the US where the city starts with one of the following characthers:.

Note that not all students in the same class have the same exact number of assessments.

The documents look like this: At the end I just want to say if you want to learn mongoDB, First practice with youself. Using the aggregation framework, calculate the sum total of people who are living in a zip code where the city starts with one of those possible first characters.

Don’t include their quiz scores in the calculation. You need to group twice to solve this problem.

Who’s the easiest grader on campus? We will take these are the prefered cities to live in chosen by this instructor, given is special affection to this set of characters! This involves calculating an average for each student in each class of all non-quiz assessments and then averaging those numbers to get a class average.

Prefered Cities to Live! Check all that apply. Choose the answer below. Different states might have the same city name. You must figure out the GPA that each student has achieved in a class and then average those numbers to get a class average.

To help you verify your homewoork before submitting, the author with homewlrk fewest comments is Mariela Sherer and she commented times. If you notice that while importing, there are a few duplicates fear not, this is expected and will not affect your mongodn. Crunching the Zipcode dataset Please calculate the average population of cities in California abbreviation CA and New York NY taken together with populations over 25, For this set, there are only documents and zip codesand all of them are in New York, Connecticut, New Jersey, and California.

Try for your self. Those students achieved a class 51. of To be clear, each student’s average includes only exams and homework grades.

# [SOLUTION] WEEK 5 : INDEXES AND PERFORMANCE : MJS: MONGODB FOR DEVELOPERS

Some students have three homework assignments, etc. Start by downloading the handout zip file for monodb problem. In this assignment you will use the aggregation framework to find the most frequent author of comments on your blog. For this problem, we have used a subset of the data you previously used in zips.

Please choose your answer below for the most prolific comment author:. After that, you just need to sort.

## M101 Homework 3 1

Download the handout and mongoimport. A city might have multiple zip codes. You will need to probably change your projection to send more info through than just that first character. Please use the Aggregation pipeline to solve this homeqork. You will be using the zip code collection data set, which you will find in the ‘handouts’ link in this page. The answer for CT and NJ using this data set is Also, you will need a filtering step to get rid of all documents where the city does not start with the select set of initial characters.