Query transactions aggregated by host per minute

API Question Template

I am trying to query transactions aggregated by host per minute using following NerdGraph query

{
  actor {
    account(id: {ACCOUNTID}) {
      nrql(query: """
        SELECT AVERAGE(duration), COUNT(*) FROM Transaction SINCE 30 MINUTE AGO 
          WHERE appId = {APPID} 
          FACET host.displayName, dateOf(timestamp), hourOf(timestamp), minuteOf(timestamp)
        """) {
        results
      }
    }
  }
}

I suppose I can get response containing data for each minute, but in fact only see a few entries.
Please what is the problem?

Thanks in advance

Hi @jerry.wang - First step it so add LIMIT MAX to the query.

Hi @jerry.wang,

Here’s what you could try:

  1. Add EXTRAPOLATE to your NRQL Query

  2. Query against METRIC instead of Events(Transaction in this case). Sample Query:

SELECT count(newrelic.goldenmetrics.apm.application.throughput) FROM Metric 
WHERE appId = {APPID}  SINCE 30 MINUTE AGO  FACET appName

I’d recommend 2nd option.