![]() ![]() Write a MongoDB query to find the restaurant Id, name and grades for those restaurants where the 2nd element of grades array contains a grade of "A" and score 9 on an ISODate "". ![]() Write a MongoDB query to find the restaurant Id, name, and grades for those restaurants which achieved a grade of "A" and scored 11 on an ISODate "" among many of survey dates. Write a MongoDB query to find the restaurant Id, name, borough and cuisine for those restaurants which prepared dish except 'American' and 'Chinees' or restaurant's name begins with letter 'Wil'. Write a MongoDB query to find the restaurant Id, name, borough and cuisine for those restaurants which achieved a score which is not more than 10. Write a MongoDB query to find the restaurant Id, name, borough and cuisine for those restaurants which are not belonging to the borough Staten Island or Queens or Bronxor Brooklyn. Write a MongoDB query to find the restaurant Id, name, borough and cuisine for those restaurants which belong to the borough Staten Island or Queens or Bronxor Brooklyn. Write a MongoDB query to find the restaurants which belong to the borough Bronx and prepared either American or Chinese dish. Write a MongoDB query to find the restaurant Id, name, borough and cuisine for those restaurants which contain 'Reg' as three letters somewhere in its name. Write a MongoDB query to find the restaurant Id, name, borough and cuisine for those restaurants which contain 'ces' as last three letters for its name. Write a MongoDB query to find the restaurant Id, name, borough and cuisine for those restaurants which contain 'Wil' as first three letters for its name. The document must be displayed according to the cuisine in descending order. Write a MongoDB query to find the restaurants which do not prepare any cuisine of 'American' and achieved a grade point 'A' not belongs to the borough Brooklyn. Note : Do this query without using $and operator. Write a 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. Write a MongoDB query to find the restaurants that do not prepare any cuisine of 'American' and their grade score more than 70 and latitude less than -65.754168. Write a MongoDB query to find the restaurants which locate in latitude value less than -95.754168. Write a MongoDB query to find the restaurants that achieved a score, more than 80 but less than 100. Write a MongoDB query to find the restaurants who achieved a score more than 90. Go to the editorħ.Write a MongoDB query to display the next 5 restaurants after skipping first 5 which are in the borough Bronx. Write a MongoDB query to display the first 5 restaurant which is in the borough Bronx. Write a MongoDB query to display all the restaurant which is in the borough Bronx. Write a MongoDB query to display the fields restaurant_id, name, borough and zip code, but exclude the field _id for all the documents in the collection restaurant. Write a 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. Write a MongoDB query to display the fields restaurant_id, name, borough and cuisine for all the documents in the collection restaurant. Write a MongoDB query to display all the documents in the collection restaurants. ![]() The collection comprises of 3772 documents.ġ. You may download the compressed file and uncompress it to find the collection used in our exercises. Happy Coding! MongoDB Query Exercises and Solution Currently, following exercises are available based on ' restaurants' collection, we are working hard to add more exercises. Hope, these exercises help you to improve your MongoDB query skills. We have started this section for those (beginner to intermediate) who are familiar with NoSQL and MongoDB. The best way we learn anything is by practice and exercise questions. Classified as a NoSQL database, MongoDB avoids the traditional table-based relational database structure in favor of JSON-like documents with dynamic schemas, making the integration of data in certain types of applications easier and faster. MongoDB is a free and open-source cross-platform document-oriented database.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |