hive group by with cube和grouping sets用法
1.group by with cube
此方式对每一个统计维度打cube,维度的空值自动会变成null,使用coalesce(x x x x,‘all’)把对应维度的null转为all,就是该字段的合计值
select
coalesce(page_city_name,'all') as page_city_name,
coalesce(item_index,'all') as item...
原创
2019-09-12 15:58:39 ·
2848 阅读 ·
0 评论