0

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!

Maximillian Laumeister
  • 19,884
  • 8
  • 59
  • 78
user955732
  • 1,330
  • 3
  • 21
  • 48

1 Answers1

1

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
xpa1492
  • 1,953
  • 1
  • 10
  • 19