aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/window/multiaggr_subq.sql.txt
blob: 0c1d4f8b403eed2013604d4545223082fa2984f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
import agg_factory symbols $factory;
use plato;

define subquery $multiaggr_win() as
    select
        MULTI_AGGREGATE_BY(AsStruct(subkey as a,value as b), $factory) over w as ma,
        ROW_NUMBER() over w as rn
    from Input window w as (order by key);
end define;

export $multiaggr_win;