aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/aggr_factory/multi_minmaxby.sql
blob: 4d8628971ba3af5bcb7292274ab82defb1548bce (plain) (blame)
1
2
3
4
5
6
7
8
9
10
/* syntax version 1 */
/* postgres can not */
SELECT
    MULTI_AGGREGATE_BY(nums, AGGREGATION_FACTORY("minby"))
FROM (select TableRow() as nums from AS_TABLE([<|x:(1,6)|>,<|x:(3,4)|>,<|x:(5,2)|>]));


SELECT
    MULTI_AGGREGATE_BY(nums, AGGREGATION_FACTORY("maxby", 2))
FROM (select TableRow() as nums from AS_TABLE([<|x:(1,6)|>,<|x:(3,4)|>,<|x:(5,2)|>]));