Subquery in FROM clause
A subquery in a FROM clause acts similarly to a temporary table that is generated during the execution of a query and lost afterwards.
Subquery in SELECT clause
Subquery in WHERE clause
Use a subquery to filter the result set. For example this will return all employees with a salary equal to the highest