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 define queries for later reuse for the duration of the current session
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.