Commit 77f1ab42 authored by 王志伟's avatar 王志伟

smart_rank 相关的统计指标

parent 59ed61b9
...@@ -685,15 +685,32 @@ object smart_rank_count { ...@@ -685,15 +685,32 @@ object smart_rank_count {
val zixun_pv_count = sc.sql( val zixun_pv_count = sc.sql(
s""" s"""
|select meigou_city,count(device_id) as meigou_pv,count(distinct(device_id)) as meigou_device_num |select meigou_city,count(device_id) as meigou_zixun,count(distinct(device_id)) as meigou_zixun_device_num
|from zixun_meigou_tongcheng |from zixun_meigou_tongcheng
|where device_city=meigou_city |where device_city=meigou_city
|group by meigou_city |group by meigou_city
""".stripMargin """.stripMargin
) )
meigou_pv_count.show() zixun_pv_count.show()
//开始计算每个地区每月新增设备
val device_new_count = sc.sql(
s"""
|select device_id,first_city
|from online.ml_device_day_active_status
|where active_type != '4'
|partition_date='20181212'
""".stripMargin
)
//
......
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