Is there a way to categorically query latest data for all events in dashboard?

Let’s assume I have a query to capture passed and failed tests in a given time,

SELECT uniqueCount(test)  from Log WHERE browser='chrome' FACET status SINCE 1 day ago UNTIL now
  • suppose status represents pass/fail

If the tests executed multiple times over the span of the specified time, I am looking for a way to display the latest results for each field while not having duplicates.

Hi, @abhinaba.ghosh: Try using the latest() function, rather than uniqueCount().

Thanks, @philweber for the quick response. But I need to evaluate the latest unique count of the tests and it seems both queries can be applied at once.

SELECT latest(test)  from Log

will certainly return me the test information, not the latest count based on the FACET entity.

How about:

SELECT testCount FROM
  (SELECT uniqueCount(test) AS testCount, latest(status) AS latestStatus
   FROM Log WHERE browser = 'chrome'
   SINCE 1 day ago)
FACET latestStatus
1 Like

Thanks, @philweber . While this query makes perfect sense, I think FACET is not supported with events. I am getting error such as -

We can't render this query: Error calling external service: External Service 'NRDB' execution resulted in 400 - cause: FACET cannot be used when selecting on event fields