aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/aggregate/group_by_gs_grouping.sql
blob: a6f003d445528b43e0f8b55d5138cd894a0dc961 (plain) (blame)
1
2
3
4
5
/* syntax version 1 */
/* postgres can not */
select count(1), key_first, val_first, grouping(key_first, val_first) as group
from plato.Input group by grouping sets (cast(key as uint32) / 100u as key_first, Substring(value, 1, 1) as val_first)
order by key_first, val_first;