助力工业物联网,工业大数据之服务域:安装主题分析实现【三十】(1)

	    ,sum_repair_num int comment '维修数量'
	    ,max_repair_num int comment '维修最大数量'
	    ,min_repair_num int comment '维修最小数量'
	    ,avg_repair_num decimal(20, 1) comment '维修平均数量'
	    ,sum_wo_num int comment '派工数量'
	    ,max_sum_wo_num int comment '派工最大数量'
	    ,min_sum_wo_num int comment '派工最小数量'
	    ,avg_sum_wo_num decimal(20, 1) comment '派工平均数量'
	    ,sum_remould_num int comment '巡检数量'
	    ,max_remould_num int comment '巡检最大数量'
	    ,min_remould_num int comment '巡检最小数量'
	    ,avg_remould_num decimal(20, 1) comment '巡检平均数量'
	    ,sum_alread_complete_num int comment '回访数量'
	    ,max_alread_complete_num int comment '回访最大数量'
	    ,min_alread_complete_num int comment '回访最小数量'
	    ,avg_alread_complete_num decimal(20, 1) comment '回访平均数量'
	    ,dws_day string comment '日期维度-按天'
	    ,dws_week string comment '日期维度-按周'
	    ,dws_month string comment '日期维度-按月'
	    ,oil_type string comment '油站维度-油站类型'
	    ,oil_province string comment '油站维度-油站所属省'
	    ,oil_city string comment '油站维度-油站所属市'
	    ,oil_county string comment '油站维度-油站所属区'
	    ,customer_classify string comment '客户维度-客户类型'
	    ,customer_province string comment '客户维度-客户所属省'
	) comment '客户主题表'
	partitioned by (month String, week String, day String)
	stored as orc
	location '/data/dw/st/one\_make/subj\_customer'
	;
	
	```
  • 构建
insert overwrite table one_make_st.subj_customer partition(month = '202101', week='2021W1', day='20210101')

  select

      sum(fwo.install_num) sum_install_num,                  --安装数量

  	max(fwo.install_num) max_install_num,                  --最大安装数量

  	min(fwo.install_num) min_install_num,                  --最小安装数量

      avg(fwo.install_num) avg_min_install_num,              --平均安装数量

  	sum(fwo.repair_num) sum_repair_num,    
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值