Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For questions 1-8, use MongoDB Compass and open the restaurant collection in restaurantDB to answer the questions below. Include the query used (make sure to

For questions 1-8, use MongoDB Compass and open the restaurant collection in restaurantDB to answer the questions below. Include the query used (make sure to include all stages) and the results of the query.

Question

Query Used

Answer

  1. What are the borough and the coordinates of the restaurant with the most employees in the database? Return the borough name and the coordinates of the restaurant.

  1. Among the restaurants that offer 4 dining options and are located in "Bronx", compute the number of restaurants that opened in each year. Show the number of restaurants and year.

  1. What are the streets and cuisines of the two oldest restaurants in "Brooklyn"? Show the street names and cuisines of the restaurants.

  1. Among the restaurants that offer only the "Takeout" option and opened in 2010, show the average number of employees by borough. Present all the results based on the lowest to highest average number of employees.

(Round query result to second decimal)

  1. Among the restaurants that offer "Takeout" and "Dine-in" options, what are the three most popular cuisines? Please present the cuisines and the number of restaurants of each cuisine.

  1. How many restaurants have more than 5 employees and are located in zip code "11361"?

  1. How many restaurants offer "Hamburgers" and opened in 2010 or later?

  1. Among the restaurants located at "18 Avenue", return the 2 restaurants with the smallest number of employees. Return the street name, the number of employees, and cuisine of the restaurants

  1. Open the restaurantdb.list collection. Provide the query that connects the address collection to the list collection and name the field "restaurant_address" to join the tables.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Cross-Border Mergers And Acquisitions UK Dimensions

Authors: Moshfique Uddin, Agyenim Boateng

1st Edition

0415836603, 9780415836609

Students also viewed these Accounting questions

Question

What is the message repetition?

Answered: 1 week ago

Question

What is the budget for this project?

Answered: 1 week ago