Selecting OLAP window expressions
You can include OLAP window expressions in the select list of the Projection clause.
The On-Line Analytical Processing (OLAP) functions can return ranking, row numbering, and aggregate function information for the entire result set of a query or subquery, or for partitioned subsets of the qualifying rows that the OLAP window defines. You can use OLAP specifications to define moving windows within a partition of the result set for examining dimensions of the data, and identifying patterns, trends, and exceptions within data sets.
A query that includes OLAP window expressions returns the rows in the result set of the query, and the results of the OLAP window functions, if those functions return anything.
An OLAP window aggregate function expression can be the argument to another OLAP window aggregate function. OLAP window aggregates cannot, however, be arguments to non-analytic aggregate functions.