作业Mongo | database代做 – MOGO代写

MOGO代写

作业Mongo | database代做 | 数据库代写 – 这个题目属于一个database的代写任务, 涵盖了Mongo/database等程序代做方面

mongodb代写 代写mongodb 数据库代写

CAS 412 MEAN PS5: Mongo Puzzles

For each problem, copy the command that you used into the corresponding PDF text box.

P1. Select all of the restaurants in Manhattan.

P2. Select all of the restaurants in Manhattan, but only display the name of the restaurant and its type of cuisine.

P3. Select all of the restaurants in Manhattan with a sanitation grade of A

P4. Find the number of restaurants (just the number) in the database that are located in Manhattan.

P5. Find the number of restaurants (just the number) in the database that are located either in Manhattan or in Queens.

P6. Update the Lexler Deli and change its address to 111 Short Street in Bronx. You can leave the zip code and lat/long coordinates alone.

P7. Insert a new restaurant with the following data: Name: Maggies Hideaway Address: 1234 Commonwealth Ave, Boston MA 02215 Cuisine: Comfort

P8: Find all restaurants on Wall Street; sort them by score.

P9: Find all restaurants on Wall Street; sort them by score. Display only the name and score.

P10 (no points, just for fun): Using the same method you used to load the sample restaurants database, load the collection at https://raw.githubusercontent.com/ mongodb/docs-assets/geospatial/restaurants.json into the test db, in a collection named geo.

Next, find the number of restaurants that are within a 1-mile radius of Morris Park Bake Shop. Copy and paste the lat/long of the bake shop rather than constructing a query to insert the lat/long.