

MCQOPTIONS
Saved Bookmarks
This section includes 10 Mcqs, each offering curated multiple-choice questions to sharpen your Technical MCQs knowledge and support exam preparation. Choose a topic below to get started.
1. |
Which stages in aggregation framework is a filtering operation and thus this can reduce the amount of documents that are given as input to the next stage? |
A. | $limit |
B. | $match |
C. | Both A and B can be used |
D. | None of the above |
E. | |
Answer» C. Both A and B can be used | |
2. |
What is true about $skip stages in aggregation framework ? |
A. | This is a filtering operation and thus this can reduce the amount of documents that are given as input to the next stage. |
B. | This limits the amount of documents to look at, by the given number starting from the current positions. |
C. | With this, it is possible to skip forward in the list of documents for a given amount of documents. |
D. | None of the above |
Answer» D. None of the above | |
3. |
What is true about $group stages in aggregation framework ? |
A. | This is a filtering operation and thus this can reduce the amount of documents that are given as input to the next stage. |
B. | This does the actual aggregation |
C. | Sorts the documents |
D. | None of the above |
Answer» C. Sorts the documents | |
4. |
What is true about $unwind stages in aggregation framework ? |
A. | It is used to unwind document that are using arrays. |
B. | When using an array, the data is kind of pre-joined and this operation will be undone with this to have individual documents again. |
C. | This stage we will increase the amount of documents for the next stage. |
D. | All of the above |
Answer» E. | |
5. |
Which stages in aggregation framework Used to select some specific fields from a collection? |
A. | $project |
B. | $group |
C. | $limit |
D. | $unwind |
Answer» B. $group | |
6. |
Which of th following expression is used to gets the first document from the source documents according to the grouping? |
A. | $addToSet |
B. | $first |
C. | $push |
D. | $last |
Answer» C. $push | |
7. |
Which of th following expression is used to Inserts the value to an array in the resulting document? |
A. | $addToSet |
B. | $first |
C. | $push |
D. | $last |
Answer» D. $last | |
8. |
Which of th following expression is used to gets the maximum of the corresponding values from all documents in the collection? |
A. | $sum |
B. | $push |
C. | $min |
D. | $max |
Answer» E. | |
9. |
Which of th following expression is used to calculates the average of all given values from all documents in the collection? |
A. | $sum |
B. | $avg |
C. | $min |
D. | $max |
Answer» C. $min | |
10. |
The basic syntax of Aggregation is? |
A. | db.COLLECTION_NAME.aggregate ({key:1}) |
B. | db.COLLECTION_NAME.aggregation (AGGREGATE_OPERATION) |
C. | db.COLLECTION_NAME.aggregate (AGGREGATE_OPERATION) |
D. | aggregate (AGGREGATE_OPERATION) |
Answer» D. aggregate (AGGREGATE_OPERATION) | |