Unions in Subqueries
A union clause is allowed in a subquery inside a derived-table expression.
Rename Columns with SQL-Derived Tables
If a derived column list is included for a SQL-derived table, it follows the name of the SQL-derived table and is enclosed in parentheses.
Constant Expressions
If a column name is not specified in the target list of the derived-table expression, as in the case where a constant expression is used for the column name, the resulting column in the SQL-derived table has no name.
Aggregate Functions
Derived-table expressions can use aggregate functions, such as sum, avg, max, min, count_big, and count.