|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,10 +647,10 @@ object alpha_ctr {
...
@@ -647,10 +647,10 @@ object alpha_ctr {
valduration_everytime_avge=sc.sql(
valduration_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