A MongoDB database administrator needs to improve the performance of the following query:
db.employees.find(
{},
{ name: 1, department: 0, salary: 1 }
).sort({ department: 1, salary: -1 });
What index should the administrator use to achieve this goal?
In a replica set, a_________number of members ensures that the replica set is always able to select a primary.
Consider that you have a collection called population which has fields state and city. Which of the following query will calculate the population grouped by state and city?
In a replica set, which member is responsible for maintaining copies of the primary ' s data?
Which of the following command inside aggregate command is used in MongoDB aggregation to filter the documents to pass only the documents that match the specified condition(s) to the next pipeline stage.