I have a collection of documents. I would like to find document with smallest id. I tried to run the query:
SELECT min(c.id) FROM c
But it returns an error. The Microsoft Azure Storage Explorer does not allow to copy this text, therefore i pasted an image. How to return the smallest id?
Whenever you want to access a value only, use the
VALUE
keyword as follows:Especially when it comes to cross-partition queries this is required, as else the request would fail.