Problem
Structure of "restaurants" collection
{
"address": {
"building": "1007",
"coord": [-73.856077, 40.848447],
"street": "Morris Park Ave",
"zipcode": "10462"
},
"borough": "Bronx",
"cuisine": "Bakery",
"grades": [
{"date": {"$date": 1393804800000}, "grade": "A", "score": 2},
{"date": {"$date": 1378857600000}, "grade": "A", "score": 6},
{"date": {"$date": 1358985600000}, "grade": "A", "score": 10},
{"date": {"$date": 1322006400000}, "grade": "A", "score": 9},
{"date": {"$date": 1299715200000}, "grade": "B", "score": 14}
},
"name": "Morris Park Bake Shop",
"restaurant_id": "30075445"
}
I. Write Aa MongoDB query to display the fields restaurant_id, name, borough and cuisine, but exclude the field _id for all the documents in the collection restaurant
II. Write Aa MongoDB query to find the restaurants which do not prepare any cuisine of 'American' and achieved a score more than 70 and located in the longitude less than -65.754168
Note: don't query using $and operator
III. Write Aa MongoDB query to arrange the name of the cuisine in ascending order and for that same cuisine borough should be in descending order.
IV. Write Aa MongoDB query to know whether all the addresses contain the street or not.
V. Write Aa MongoDB query which will select the restaurant_id, name and grades for those restaurants which returns 0 as a remainder after dividing the score by 7.