2.1.21. Nested queries

  • Essential one or more (inner) queries within an (outer) query
  • Inner and outer query
  • Not to be confused with inner and outer joins
  • Inner query can go in three places
    • SELECT clause (projection list)
      • Must return a single value, then aliased as attribute in outer result
    • FROM clause
      • Inner query result used as standard table in FROM cross product
    • WHERE clause