Non-Correlated Subqueries II

Great! The query we just ran is just one kind of subquery, what we refer to as a non-correlated subquery. A non-correlated subquery is a subquery that can be run independently of the outer query and as we saw, can be used to complete a multi-step transformation.

Let's try one more non-correlated subquery. Perhaps we'd like to look at a selection of flights whose origin airport is a seaplane base, designated by SEAPLANE_BASE. The facility type of an airport is located in the fac_type field of the airports table.

FROM flights 
WHERE origin in (
    SELECT code 
    FROM airports 
    WHERE fac_type = 'SEAPLANE_BASE');
Community Forums
Get help and ask questions in the Codecademy Forums
Report a Bug
If you see a bug or any other issue with this page, please report it here.