Subqueries

When a query is executed it can be run in multiple steps as multiple executed queries, some of which take results from other queries as inputs. We call these parts independent subqueries, because they are run independently of the primary query.

The events a subquery processes, and how the results are used, differ depending on the context. Understanding these differences is essential for writing effective queries.

In some queries, there may be a need for a subquery to perform a specific operation or select more data. Subqueries are executed in a similar fashion to the primary query, but the selection of the data and time range may be affected by the function calling the subquery.