OLAP-specification:

1 ranking-specification
1 numbering-specification

ranking-specification:

1 RANK
1 DENSE_RANK
2 ( ) OVER (
3? window-partition-clause
4 window-order-clause )

numbering-specification:

1 ROW_NUMBER ( ) OVER (
2? window-partition-clause
3? window-order-clause
4 )

window-partition-clause:

1 PARTITION BY
2+ ,
2 partitioning-expression

window-order-clause:

1 ORDER BY
2+ ,
2.0 sort-key-expression
2.0.1! ASC
2.0.1.1! NULLS LAST
2.0.1?
2.0.1 ASC NULLS FIRST
2.0.1 DESC
2.0.1.1! NULLS FIRST
2.0.1 DESC NULLS LAST
2.0 ORDER OF table-designator