Use the following questions to help you review the material in this tutorial.
Quiz Summary
0 of 5 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 5 Questions answered correctly
Time has elapsed
Categories
- Not categorized 0%
-
You’ve finished the quiz! Move on to the next lesson or click on View Questions to review the quiz.
-
Well done! Move on to the next lesson or click on View Questions to review the quiz.
- 1
- 2
- 3
- 4
- 5
- Current
- Review
- Answered
- Correct
- Incorrect
-
Question 1 of 5
1. Question
You are building a query to retrieve documents from a collection that stores information about your company’s
inventory
. The query is based on the inventory array, which includes multiple embedded documents.Each embedded document contains the
product
andin_stock
fields. You want to find the warehouses that have at least 20 items of a specific product.Which operator should the query include to return the correct documents?
CorrectIncorrect -
Question 2 of 5
2. Question
You are building a query to search the
customers
collection. The query is based on thetravel
array, which is made up of embedded documents that describe visited countries.Each embedded document includes the
country
field and thevisits
field. You want to find customers who have visited Canada exactly three times.Which
find
statement should you use?CorrectIncorrect -
Question 3 of 5
3. Question
You are building a query to search the
customers
collection. The query is based on thetravel
array, which is made up of embedded documents that describe visited countries.Each embedded document includes the
country
,visits
, andrating
fields, in that order. You want to return all documents for customers who have visited Thailand two times and who have assigned the country a rating of 9. You run the following query, but it returns no documents:db.customers.find({ travel: { visits: 2, rating: 9, country: "Thailand" } } );
You know that the collection contains documents that meet your search criteria. Why does the statement fail to return any documents?
CorrectIncorrect -
Question 4 of 5
4. Question
You are building a query to search the
customers
collection. The query is based on thetravel
array, which is made up of embedded documents that describe visited countries.Each embedded document includes the
country
,visits
, andrating
fields. You want to find customers who have visited a country two or more times and who have rated the country as 7 or less.Which
find
statement should you use?CorrectIncorrect -
Question 5 of 5
5. Question
You are using Visual Query Builder to create a query to search the
customers
collection. The query is based on thetravel
array, which is made up of embedded documents that describe visited countries. Each embedded document includes thecountry
,visits
, andrating
fields.You want to find customers who have traveled to Costa Rica. In the query form, you select the Has array element(s) matching option and add the name of the array to the Array box. Next, you click the Add button to add a section for defining the search condition.
What should you type in the first drop-down list in the new search condition section?
CorrectIncorrect