Reputation: 1370
I am trying to create an epl statement using esper for monitoring response times, something like this:
SELECT QUEUENAME, count(latency>1000) AS NUMBER_OF_SLA_BREACHES, COUNT(latency) AS TOTALS FROM ResponseWindow GROUP BY QUEUENAME
.. however the two count() gives same results, which is incorrect.
Thanks for any help correcting this query!
Upvotes: 0
Views: 334
Reputation: 1973
You need to add the filter as a second parameter to the count
aggregation function like this:
SELECT QUEUENAME, count(*,latency>1000) AS NUMBER_OF_SLA_BREACHES, COUNT(latency) AS TOTALS FROM ResponseWindow GROUP BY QUEUENAME
Upvotes: 1