Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

How to get total transaction by host/month?


#1

Hello Community,

We got this query:

“SELECT (count(*)/3600) FROM Transaction WHERE host IN (‘namehos1’, ‘namehost2’, ‘namehost3’) FACET host SINCE last month TIMESERIES 1 day”

but the query don’t show the total data, is there another query to show the complete data transacction by host?

hope your comments, regards!


#2

Hi @aguilarja - It could be due to you dividing the count result.


#3

Hello @aguilarja,

Thank you for reaching out. Did you happen to see @stefan_garnham reply?

In addition to what Stefan stated, perhaps this NRQL would meet your use case:

SELECT count(*) FROM Transaction WHERE host IN (‘namehos1’, ‘namehost2’, ‘namehost3’) FACET host, monthOf(timestamp) SINCE last month

Regards


#4

Hello Stefan / Sbetea,

Thanks for the repley.

And how can I show the graph of the days of the month?

Regards.


#5

Hi @aguilarja - You can use the Cohort Analysis functions to show data by various time spans.


#6

Hello stefa,

how to show with TIMESERIES, this query “SELECT (count(*)/3600) FROM Transaction WHERE host IN (‘namehos1’, ‘namehost2’, ‘namehost3’) FACET host SINCE last month TIMESERIES 1 day” Only show me from today to 26NOV but not show the last month completly. look the image below, no show November completly:

newrelic

regards


#7

@aguilarja - your account has an Insights Free subscription, which comes with 8 days retention by default.

You will not be able to query a full month while you are limited to that 8 day retention period. That is detailed here:

https://docs.newrelic.com/docs/using-new-relic/welcome-new-relic/getting-started/data-retention-components#default-insights

Let me know if you’d like some help to connect with your account rep to look at more retention options. :slight_smile:


#8

thanks for your reply you right my account is on Insights Free type :frowning:

Regards.