Subquery in NRQL


I want to run a query with a subquery inside it.
the main query gets a lot of information based on taskId’s, and i can find the taskId’s i need (those that failed) on another table.

I searched the forums and saw posts from 2-3 years back of people asking if it exists already, and suggesting it as a feature, but i couldnt find if its implemented or not.

can some1 assist please? if its not available, is there an ETA on this feature?

This is the feature request post --> Feature Idea: Subquery in NRQL



Hi @dekel.moyal

Sub-queries are not yet possible… but I’ll get your +1 added. I know there is some investigation into the feasibility of features like this happening right now, so it’s a good time to get your feature idea vote added in the feature idea thread that you linked. :slight_smile:

+1 from me too!

I was just trying this today

IE: Get the percentile duration of set of requests based on other calculated conditions that I can’t get from a simple where clause.

1 Like

Thanks for the +1 @stefan.ray - I got that logged for you :slight_smile:

Piling on here for this feature. Right now, the use case is to combine Logs table with something like AwsLambdaInvocation - eg, fetch all of the logs for request IDs that had a LambdaTimeout error.

Great to see @david.jetter. Keep an eye on this thread for any update.

Chiming in to point in the direction of Nested Aggregation:

This is sub-query support and may help you get closer to your goals.