Mongo | 代做database | mongodb – Module 7 Class Exercise

Module 7 Class Exercise

Mongo | 代做database – 这是利用Mongo进行训练的代写, 对Mongo的流程进行训练解析, 涉及了Mongo/database等代写方面

数据库代写 代写数据库 database代做 sql代写

In this assignment, you will create a MongoDB database, populate a collection of records, and run search and aggregation queries against it. To complete the assignment, please, refer to Module 6 Class Exercise ( ( , Module 7 Class Exercise ( ( , MongoDB Basics Tutorial ( and Py Mongo Tutorial (


Step 1 – Download and install MongoDB

Refer to our MongoDB Installation Guide

Step 2 – Create and populate MongoDB database

Start a Jupyter Notebook
Import the records from companies.json
or companies.csv (
download_frd=1) into your Notebook
Note the records have the following fields:
company [name]
[headquarter] city, state, country
[number of] employees
founded [year]
[annual (2020 or 2021)] revenue [in billions USD]
Import pymongo package and connect to the MongoDB database
Create a collection by inserting the set of records imported from the JSON or CSV file

Step 3 – Search and Aggregation Queries

Using pymongo , build and run search and/or aggregation queries against the "companies" collection to the following:

  1. Print the list of companies established in the last 25 years in the descending order of revenue.
  2. Print the total of annual revenues of the companies headquartered in Asia (China, Korea, Japan, and Saudi Arabia).
  3. Print the country in which the company that is among the world’s leading car and truck manufacturers located.
  4. Print the company established after 1970, which has the smallest number of employees.
  5. Print the annual revenues and the founding years of the automotive companies.

If the student’s FIRST NAME starts with an EVEN numbered letter in English (B,D,F,H,J,L,N,P,R,T,V,X,Z):

  1. Print the list of companies established since 1990 in the ascending order of number of employees.
  2. Print the totals of annual revenues of the companies headquartered in the US and Europe (Germany, UK, Switzerland), respectively
  3. Print the country where the company that has the world’s second largest proven crude oil reserves headquartered.
  4. Print the company established before 1970, which has the largest annual revenue.
  5. Print the total revenue and the total number of employees of all energy (oil and gas) companies.

Helpful hint: the italicized text refers to the description of the company.


See the attached rubric for detailed assessment criteria.


Your final submission should be a Jupyter Notebook file (.ipynb and .html) that shows the creation of database collection (step 2) and PyMongo queries for questions 1-5 (step 3) with the returned and

printed output.

  1. Click the blue Submit Assignment button at the top of this page.
  2. Click the Choose File button, and locate your submission.
  3. Feel free to include a comment with your submission.
  4. Finally, click the blue Submit Assignment button.