Using multiple select statements

I’m trying to do comparisons with multiple select statements in NRQL. For example:

SELECT (SELECT SUM(value) from `my-event-type` where someAttribute='foo') as metric_one, (SELECT SUM(value) from `my-event-type` where someAttribute='bar') as metric_two SINCE 1 day ago

The above does not work, yielding

We can't render this query: Unknown expression (SELECT `SUM`( .... 

Individually the selects do work as expected. What is the best way to combine them?


Hi, @mbond: You may find this document helpful: Nested aggregation: make ordered computations in a single query | New Relic Documentation.