![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hive
lzystar123
这个作者很懒,什么都没留下…
展开
-
hive 创建分区
在表定义时创建partition 创建单分区:create table tbl_01( name string, content string ) partitioned by( dt string ); 表结构中存在name,content,dt三列,以dt文件夹区分;创建双分区:create table tbl_01( name string, content strin原创 2015-03-26 15:23:48 · 471 阅读 · 0 评论 -
sql sum
hive -e "create table default.tbl_play_info_29 as select p1,p2,deviceid,sum(case when pt <= 180 and pt >= 0 then 1 else 0 end) cor_num,sum(case when pt>180 or pt<0 then 1 else 0 end) err_num from data原创 2015-04-21 15:28:03 · 305 阅读 · 0 评论