
hive
liangliang0927
这个作者很懒,什么都没留下…
展开
-
关于hive中not in不支持子查询的解决方法
表信息:用户User表(userid,name) 黑名单BanUser表(userid,name)问题:找出不在黑名单中的用户信息(userid,name)hive暂时不支持以下查询方式:select aa.* from user aa where aa.user not in (select a....原创 2019-03-01 11:50:24 · 10827 阅读 · 0 评论 -
hive中行转列、列转行的实现
行转列实现:表信息:test_rowcol(dt_m,vaild_num, unvaild_num)场景一:使用concat_ws和collect_set函数select dt_m, 'vaild_num', concat_ws(',', collect_set(vaild_num)) from test_rowcol group by dt_m union allsel...原创 2019-03-01 16:38:30 · 8716 阅读 · 0 评论