Concept Flow - Subqueries in FROM (derived tables)
Start Query
Execute Subquery in FROM
Create Derived Table with Subquery Result
Use Derived Table in Outer Query
Apply Outer Query Conditions/Aggregations
Return Final Result
The query first runs the subquery inside FROM, creating a temporary table (derived table). Then the outer query uses this derived table to produce the final result.