blob: 7feafa67ab4231182c5795227999c432b420e89d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
/* syntax version 1 */
/* postgres can not */
PRAGMA warning("disable", "4520");
PRAGMA AnsiRankForNullableKeys;
SELECT
key,
RANK() over w1 as r1,
DENSE_RANK() over w1 as r2,
FROM AS_TABLE([<|key:1|>, <|key:null|>, <|key:null|>, <|key:1|>, <|key:2|>])
WINDOW
w1 as (ORDER BY key ROWS BETWEEN UNBOUNDED PRECEDING AND 5 PRECEDING)
ORDER BY key;
|