Why would you use a common table expression (CTE)?
To calculate a new single value from a result set and return it to the query parser.
To create temporary tables that can be used to pre-select often-used result sets.
To break down complex queries and allow reuse within a query.
To define queries for later reuse for the duration of the current session