cume_dist() |
Computes the position of a value relative to all values in the partition. |
dense_rank() |
Computes the rank of a value in a group of values. The result is one plus the
previously assigned rank value. Unlike the function rank, dense_rank will not produce gaps
in the ranking sequence. |
lag(input[, offset[, default]]) |
Returns the value of `input` at the `offset`th row
before the current row in the window. The default value of `offset` is 1 and the default
value of `default` is null. If the value of `input` at the `offset`th row is null,
null is returned. If there is no such offset row (e.g., when the offset is 1, the first
row of the window does not have any previous row), `default` is returned. |
lead(input[, offset[, default]]) |
Returns the value of `input` at the `offset`th row
after the current row in the window. The default value of `offset` is 1 and the default
value of `default` is null. If the value of `input` at the `offset`th row is null,
null is returned. If there is no such an offset row (e.g., when the offset is 1, the last
row of the window does not have any subsequent row), `default` is returned. |
nth_value(input[, offset]) |
Returns the value of `input` at the row that is the `offset`th row
from beginning of the window frame. Offset starts at 1. If ignoreNulls=true, we will skip
nulls when finding the `offset`th row. Otherwise, every row counts for the `offset`. If
there is no such an `offset`th row (e.g., when the offset is 10, size of the window frame
is less than 10), null is returned. |
ntile(n) |
Divides the rows for each window partition into `n` buckets ranging
from 1 to at most `n`. |
percent_rank() |
Computes the percentage ranking of a value in a group of values. |
rank() |
Computes the rank of a value in a group of values. The result is one plus the number
of rows preceding or equal to the current row in the ordering of the partition. The values
will produce gaps in the sequence. |
row_number() |
Assigns a unique, sequential number to each row, starting with one,
according to the ordering of rows within the window partition. |