Question: Consider the following sample document stored in a MongoDB for restaurants. Write queries for the following questions we want to retrieve the data from

Consider the following sample document stored in a MongoDB for restaurants. Write queries for the following  

Consider the following sample document stored in a MongoDB for restaurants. Write queries for the following questions we want to retrieve the data from the database. { "address": { "borough": "Queens", "cuisine": "American", }, } "building": "8825", "coord": [-73.8803827, 40.7643124], "street": "Astoria Boulevard", "zipcode": "11369" "grades": [ { "date": {"sdate":"2014-11-15T00:00:00.000Z"}, { "grade": "Z", "score": 38 "date": {"$date": "2014-05-02T00:00:00.000Z"}, "grade": "A", "score": 10 "date": {"sdate": "2013-03-02T00:00:00.0002"}, "grade": "A", "score": 7 "date": {"sdate": "2012-02-10T00:00:00.0002"}, "grade" : "A", "score": 13 }], "name": "Brunos On The Boulevard", "restaurant_id": "40356151" 1. Write a query to retrieve names of all restaurants. 2. Write a query to retrieve names of all restaurants given grade A. 3. Write a query to retrieve all cuisines offered in all restaurants. 4. Write a query to retrieve all restaurants who achieved a score of more than 10. 5. Write a query to retrieve all restaurants located in Boulevard area.

Step by Step Solution

3.43 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The queries corresponding to the questions youve asked based on the provided document ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!