------+-------------------------------------------+ | Function | Description | +--------------------------------+-------------------------------------------+ | AVG() | The average of all input values. | +--------------------------------+-------------------------------------------+ | COUNT() | Number of input rows. | +--------------------------------+-------------------------------------------+ | CUME_DIST() | Calculates the cumulative distribution, | | | or relative rank, of the current row to | | | other rows in the same partition. Number | | | of peer or preceding rows / number of | | | rows in partition. | +--------------------------------+-------------------------------------------+ | DENSE_RANK() | Ranks items in a group leaving no gaps | | | in ranking sequence when there are ties. | +--------------------------------+-------------------------------------------+ | FIRST_VALUE() | The value evaluated at the row that is | | | the first row of the window frame | | | (counting from 1); null if no such row. | +--------------------------------+-------------------------------------------+ | LAG() | The value evaluated at the row that is | | | offset rows before the current row | | | within the partition; if there is no | | | such row, instead return default. Both | | | offset and default are evaluated with | | | respect to the current row. If omitted, | | | offset defaults to 1 and default to | | | null. LAG provides access to more than | | | one row of a table at the same time | | | without a self-join. Given a series of | | | rows returned from a query and a | | | position of the cursor, LAG provides | | | access to a row at a given physical | | | offset prior to that position. | +--------------------------------+-------------------------------------------+ | LAST_VALUE() | The value evaluated at the row that is | | | the last row of the window frame | | | (counting from 1); null if no such row. | +--------------------------------+-------------------------------------------+ | LEAD() | Provides access to a row at a given | | | physical offset beyond that position. | | | Returns value evaluated at the row that | | | is offset rows after the current row | | | within the partition; if there is no | | | such row, instead return default. Both | | | offset and default are evaluated with | | | respect to the current row. If omitted, | | | offset defaults to 1 and default to null. | +--------------------------------+-------------------------------------------+ | MAX() | Maximum value of expression across all | | | input values. | +--------------------------------+-------------------------------------------+ | MEDIAN() ³Ρא