🔥 3-day streak
Microsoft Azure Cosmos DB Developer Specialty (DP-420)39 / 104
Question 39 of 104

You maintain an Azure Cosmos DB for NoSQL container storing customer orders, partitioned by /customerId. Each order document contains an array named items, where each element has a productId and quantity. A reporting service must return, for a single specified customerId, the number of distinct products that customer has ever ordered across all their order documents. You want the most RU-efficient query that returns a single scalar value. Which query approach should you use?

Reviewed for accuracy · Report an issueNext question