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

区别新老客户

parent 84a6523d
......@@ -168,7 +168,7 @@ object testt {
//2.日记本点击数
val diary_clk_device = sc.sql(
s"""
|select cl_id as device_id
|select ov.cl_id as device_id
|from online.tl_hdfs_maidian_view ov left join agency_id
|on ov.cl_id = agency_id.device_id
|where ov.action = 'on_click_diary_card'
......@@ -215,7 +215,7 @@ object testt {
//3.日记本曝光数
val diary_expoure_device=sc.sql(
s"""
|select cl_id as device_id
|select od.cl_id as device_id
|from online.ml_community_exposure_detail od left join agency_id
|on od.cl_id = agency_id.device_id
|where od.business_type = "diary"
......@@ -262,13 +262,13 @@ object testt {
//4.搜索次数统计
val search_device = sc.sql(
s"""
|select cl_id as device_id
|select ov.cl_id as device_id
|from online.tl_hdfs_maidian_view ov left join agency_id
|on ov.cl_id = agency_id.device_id
|where (ov.action = 'do_search' or ov.action = 'search_result_click_search')
|and ov.partition_date ='${partition_date}'
|and agency_id.device_id is null
|and ov.cl_id not in (select device_id from blacklist)
|and ov.cl_id not in (select device_id from blacklist)
""".stripMargin
)
search_device.createOrReplaceTempView("search_device")
......@@ -294,7 +294,7 @@ object testt {
//5.登录人数
val log_device = sc.sql(
s"""
|select distinct(device_id) as log_device
|select distinct(oe.device_id) as log_device
|from data_feed_exposure oe left join agency_id
|on oe.device_id = agency_id.device_id
|and oe.stat_date ='${stat_date}'
......
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