Join metric and log

How do I join and count metric and log tables
example: SELECT count(newrelic.timeslice.value), count(*) as Count FROM Metric, Log facet cases(WHERE metricTimesliceName = ‘x’ AND entity.guid = ‘y’ as Total , WHERE message LIKE ‘z’ as Failed )
Not sure which one to use newrelic.timeslice.value or * to get correct value for both.

Hi there @bhavya.talluri -

NRQL does not support joins at this time. If you check out the very bottom of this Intro to NRQL, you’ll see that, but also a workaround that may be useful to you - simulating a join with custom attributes.

Hope that gets you pointed in the right direction!

1 Like