Write a query in Cosmos DB SQL Api to select the Average value on every 20 mins of interval

HimanshuRawat-0925 6 Reputation points
2022-04-29T08:44:40.273+00:00

I have a cosmos DB database by name db1. I want to write an Cosmos DB SQL query to select the average value after every 20 mins of interval.

Sample Database values : (although data in cosmos DB is visualized in JSON format.)

197636-image.png

And the Output we want

197637-image.png

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
SQL Server | Other
{count} vote

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.