Question: I go into mongosh and enter mongoimport - - db companies - - collection research - - file companies.json to load the documents and I
I go into mongosh and enter "mongoimport db companies collection research file companies.json" to load the documents and I get the error "SyntaxError: Missing semicolon. :
Using the mongoimport tool, create the database companies by loading the documents found in the companiesjson file into the research collection. This file is located in the usrlocaldatasets directory in Apporto. Verify your load by issuing the following queries:
a dbresearch.findname : "AdventNet"
b dbresearch.findfoundedyear" : name : limit
Provide screenshots of your statements and the results as evidence.
Perform the following tasks using MongoDB queries:
a List only the first names of companies founded after the year ordered alphabetically.
b List only the first names of companies with offices in either California or Texas, ordered by the number of employees and sorted largest to smallest.
Provide screenshots of your statements and the results as evidence.
Design and implement a MongoDB aggregation pipeline to show the total number of offices by state for all companies that have offices in the United States. Be sure that you account for the fact that some companies have offices in several states. Explain your aggregation pipeline.
Provide screenshots of your statements and the results as evidence.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
