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

Aggregating data with different time period


#1

Hi everyone!

I try to compare some data from last day with avarage meaning from last month. Is it possible?

What i have

SELECT count(item) FROM ITEMStuff where entry_type='0' facet location limit 50 SINCE 1 days ago

and

SELECT count(item)/30 FROM ITEMStuff where entry_type='0' facet location limit 50 SINCE 30 days ago

I need something lagregate it in one table.

COMPARE WITH and filter(function(attribute), WHERE condition) doesn’t suit :frowning: because has the same timestamp.


#2

I’ve been wondering about this as well. I want to compare the last 6 hours with the average of the same timespan on all the previous weeks. As in, if it’s Friday, I want the same 6 hours each Friday for the last 4 weeks.

If I could merge the results of a full queries, I could do this (in an ugly manner) by setting up 4 queries selecting the correct time range 1, 2 , 3 and 4 weeks ago. Merging them, and dividing the result by four.


#3

Good morning @m_ishchenko and @snorrekim. This isn’t something that you can do in Insights right now. I’ll be happy to submit requests for both of you on this need. I could see some uses for this for certain… :slight_smile:


#4

Thank you. And I’m pretty sure it will have a tremendous amount of uses. Wanting to compare the current (short term) value with the average is invaluable.


#5

Hi, has there been any progress offering this type of analytical functionality since this post ? Thanks !