Subquerying and Subsets of Information


A subquery is a query that is nested inside another query statement.

  • aka nested query
  • In cases where you might not have the ability to create temporary tables within the design of a database,
    • you may need to subquery information to get a subset of information
  • In SQL, the subquery (inner query) executes first
    • result is then used by the outer (main) query
  • Reduces the data to only what you need to improve the performance of the data
  • subquery is placed within the statement of another query