Commit df15cfdd authored by 王志伟's avatar 王志伟

增加app使用时间

parent 98b5d9b2
...@@ -636,7 +636,7 @@ object alpha_ctr { ...@@ -636,7 +636,7 @@ object alpha_ctr {
val device_duration_avge = sc.sql( val device_duration_avge = sc.sql(
s""" s"""
|SELECT '${stat_date}' as stat_date,sum(a.time_all)/count(a.device_id) as averge_time from (select device_id,sum(params['duration']) as time_all |SELECT '${stat_date}' as stat_date,sum(a.time_all)/count(a.device_id) as device_duration_avge,count(distinct(a.device_id)) as device_num from (select device_id,sum(params['duration']) as time_all
|from bl.bl_alpha_et_mg_maidianlog_inc_d |from bl.bl_alpha_et_mg_maidianlog_inc_d
|where type='on_app_session_over' |where type='on_app_session_over'
|and partition_day='${partition_date}' |and partition_day='${partition_date}'
...@@ -647,7 +647,7 @@ object alpha_ctr { ...@@ -647,7 +647,7 @@ object alpha_ctr {
val duration_everytime_avge=sc.sql( val duration_everytime_avge=sc.sql(
s""" s"""
|SELECT '${stat_date}' as stat_date,sum(a.time_duration)/count(a.device_id) as averge_time from (select device_id,params['duration'] as time_duration |SELECT '${stat_date}' as stat_date,sum(a.time_duration)/count(a.device_id) as duration_everytime_avge from (select device_id,params['duration'] as time_duration
|from bl.bl_alpha_et_mg_maidianlog_inc_d |from bl.bl_alpha_et_mg_maidianlog_inc_d
|where type='on_app_session_over' |where type='on_app_session_over'
|and partition_day='20190404') a |and partition_day='20190404') a
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment