aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/window/yql-14738.sql
blob: b295b092c2f9a1a11c3aade5bcb7db6d744b065c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
/* postgres can not */
/* syntax version 1 */
USE plato;

SELECT
    t.*, 
    COUNT(*) OVER (PARTITION BY key || "1") as c1,
    COUNT(*) OVER (PARTITION BY key || "2") as c2,
    COUNT(*) OVER w as c3,
FROM Input as t
WINDOW w AS (PARTITION BY key || "3")
ORDER BY subkey;