QuestionQ240
Integrate an Azure Cosmos DB solutionYou have an Azure subscription containing an Azure Cosmos DB for NoSQL account. The account hosts a container named Container1 that stores product inventory data in the following format.

You need to query the average inventory quantity of each product in Washington, including the product name.
How should you complete the query?
Select
SELECT p.name, FROM products p ( SELECT AVG(i.quantity) AS inventoryAverage FROM i IN p.inventory WHERE ENDSWITH(i.location, "WA")) AS inventoryData
Community Discussion