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?


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!


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


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



Hello Stefan / Sbetea,

Thanks for the repley.

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



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


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:




@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:

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


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