aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/window/current/ansi_current.sql
blob: d005c57dc2d4ab024bd6ba58daccbd9f926fffbd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* syntax version 1 */
/* postgres can not */
pragma AnsiCurrentRow;

SELECT
    value,
    key,
    subkey,
    SUM(cast(subkey as Int32)) over w as subkey_sum,
FROM plato.Input
WINDOW w AS (
    PARTITION BY value
    ORDER BY key
)
ORDER BY value, key, subkey;