Subqueries using SQL derived tables

You can use SQL derived tables in subquery from clauses. For example, this query finds the names of the publishers who have published business books:

select pub_name from publishers
   where "business" in
      (select type from
         (select type from titles, publishers
             where titles.pub_id = publishers.pub_id)
       dt_titles)

Here, dt_titles is the SQL derived table defined by the innermost select statement.

You can use SQL derived tables in the from clause of subqueries wherever subqueries are legal. See Chapter 9, “SQL-Derived Tables.”