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

Faceting across a couple of different query patterns


#1

Hi,

I’ve got 3 queries, and I would like to find a way to display all three on the same graph, faceted into three. The complication is that the three query criteria depend partially on request_uri, and partially on a custom value we provide. The three criteria are in the 3 queries:

SELECT count(*) FROM Transaction where request_uri like ‘%pattern1%’ and customID = ‘f8f60c1e’ SINCE 4 day ago TIMESERIES 20 minutes

SELECT count(*) FROM Transaction where request_uri like ‘%pattern1%’ and customID != ‘f8f60c1e’ SINCE 4 day ago TIMESERIES 20 minutes

SELECT count(*) FROM Transaction where request_uri like ‘%pattern2%’ SINCE 4 day ago TIMESERIES 20 minutes

Any pointers?


#2

Hey @jim.campbell, try this:

SELECT filter(count(*), WHERE request_uri LIKE ‘%pattern1%’ AND customID = ‘f8f60c1e’), filter(count(*), WHERE request_uri LIKE ‘%pattern1%’ AND customID != ‘f8f60c1e’), filter(count(*), WHERE request_uri LIKE ‘%pattern2%’) FROM Transaction SINCE 4 days ago TIMESERIES 20 minutes