blob: 019551ef7e13581933d2032bee60d064a0a0baea (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* syntax version 1 */
/* postgres can not */
$input = (
SELECT * FROM plato.Input WHERE key = '1'
UNION ALL
SELECT NULL AS key, "9" as subkey, "000" as value
UNION ALL
SELECT NULL AS key, "9" as subkey, "001" as value
);
SELECT
key,
subkey,
value,
AGGREGATE_LIST(value) over w1 as agglist1,
FROM $input
WINDOW
w1 as (PARTITION BY key, subkey ORDER BY value ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
ORDER BY value;
|