Hi, how can I get the average count per minute in ESSQL?
I have tried surrounding the COUNT() with AVG() but doesnt work, this Is my query:
SELECT COUNT(*) as count_documents FROM "my-index*" WHERE
transaction.result IS NOT NULL AND service.name = 'my-service'
First, I would debug the results of your expression to ensure the COUNT(*) portion of the query matches what you're expecting, before applying the AVG(). Details on debugging elements can be found in this blog post:
I would imagine COUNT(*) is returning you a single number-- the count of results-- rather than a collection of counts to average.