This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The IT team has a collection named IotAlerts with a shard key of DeviceId. The team need to add a pipeline to the aggregation to calculate the number of times each device created an alert. What type of aggregation pipeline stage would be used to calculate this count?
$sum
$group
$unwind
When should data in the collections be embedded?
Embed when the data needs to be read or updated independently.
Embed when the data has 1:Many relationships.
Embed when the data is read or updated together.
The customer application needs to run a query that searches by lastName and firstName. What type of index should be created that returns these documents quickly and also reduces the filtering and indexing costs?
Wildcard.
One compound index for the fields lastName and firstName.
One single field index for lastName and one single field index for firstName.
You must answer all questions before checking your work.
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?