NRQL using multiple FROMs

Hello,
I would like yo know if it’s possible to join data coming from different APMs, or events, etc.
And do things like this:

FROM Metric, MyApp SELECT max(newrelic.timeslice.value), average(myValue) WHERE ‘appName’ LIKE ‘myApp’ AND ‘MyApp.name’ LIKE ‘myAppName’ facet appName, MyApp.name

I need to connect the to FROMS and assure that certain condition is true from each one
That’s why I thought, on one side appName comes from Metric and selects “newrelic.timeslice.value” and on the other side MyApp.name comes from MyApp and selects “myValue”.

Am I doing this completely wrong?

Thanks

Hello, @matias.ponce: NRQL does not support JOINs, because the data is not relational; there are not separate tables for each event. You may be able to correlate data from multiple events if the events share one or more attributes, for example:

# PageView and Transaction both have duration and name attributes,
# so this query averages the durations of both event types
SELECT average(duration) 
FROM PageView, Transaction 
WHERE appName = 'My Application' 
FACET name 

This is more like a UNION query than a JOIN; it merges the data from the two event types. I don’t think it is possible to do what you are trying to do.

1 Like

Ohh, I see

I’ll try with that

Thanks @philweber !!

Let us know how it goes for you :smiley: