TITLE
代写Mongo | database代做 – 该题目是一个常规的Mongo的练习题目代写, 涵盖了Mongo/database等程序代做方面
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 (https://courseworks2.columbia.edu/courses/174870/files/16815776?wrap=1) , Module 7 Class Exercise , MongoDB Basics Tutorial and Py Mongo Tutorial (https://pymongo.readthedocs.io/en/stable/tutorial.html)
Details
Step 1 – Download and install MongoDB
Refer to our MongoDB Installation Guide
(https://courseworks2.columbia.edu/courses/174870/pages/installation-guide-mongodb)
Step 2 – Create and populate MongoDB database
Start a Jupyter Notebook
Import the records from companies.json
(https://courseworks2.columbia.edu/courses/168012/files/16980806?wrap=1)
(https://courseworks2.columbia.edu/courses/168012/files/16980806/download?download_frd=1)
(https://courseworks2.columbia.edu/courses/174870/files/16294183/download?download_frd=1)
or companies.csv (https://courseworks2.columbia.edu/courses/168012/files/16992896?wrap=1)
(https://courseworks2.columbia.edu/courses/168012/files/16992896/download?
download_frd=1) into your Notebook
Note the records have the following fields:
company [name]
[headquarter] city, state, country
description
[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:
- Print the list of companies established in the last 25 years in the descending order of revenue.
- Print the total of annual revenues of the companies headquartered in Asia (China, Korea, Japan, and Saudi Arabia).
- Print the country in which the company that is among the world’s leading car and truck manufacturers located.
- Print the company established after 1970, which has the smallest number of employees.
- 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):
- Print the list of companies established since 1990 in the ascending order of number of employees.
- Print the totals of annual revenues of the companies headquartered in the US and Europe (Germany, UK, Switzerland), respectively
- Print the country where the company that has the world’s second largest proven crude oil reserves headquartered.
- Print the company established before 1970, which has the largest annual revenue.
- 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.
Assessment
See the attached rubric for detailed assessment criteria.
Submission
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.
- Click the blue Submit Assignment button at the top of this page.
- Click the Choose File button, and locate your submission.
- Feel free to include a comment with your submission.
- Finally, click the blue Submit Assignment button.