aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/blocks/agg_with_optional_short_keys.sql
blob: a2e36fa528e55cb9cb9ae1ccaf6a904ae06657dc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
pragma config.flags("PeepholeFlags","UseAggPhases");

$src = ListMap(ListFromRange(cast (0 as Int64), cast(500 as Int64)), ($x) -> {
    return <|
        k: if ($x % 10 == 0, NULL, $x),
        v: $x
    |>;
});

select k, sum(v) as s from as_table($src) group by k order by k, s;