rank
The rank with gaps for ties.
Flags
| Flag | Value |
|---|---|
| Kind | window |
| Nulls | never null |
| Deterministic | yes |
| Order matters | yes |
| Decomposable | no |
Example
A pipeline from the language's tested corpus that uses rank, over the example tables.
from orders
window {rn = row_number(), r = rank(), dr = dense_rank()} by:{customer} order:{amount desc, id}In a plan:
{
"args": [],
"fn": "rank"
}