Commit 98e4a44f authored by 王志伟's avatar 王志伟

查找无点击老用户

parent 0671e724
...@@ -819,7 +819,7 @@ object find_reason { ...@@ -819,7 +819,7 @@ object find_reason {
|AND pv_ratio >= 0.95 |AND pv_ratio >= 0.95
""".stripMargin """.stripMargin
) )
agency_id.show() // agency_id.show()
agency_id.createOrReplaceTempView("agency_id") agency_id.createOrReplaceTempView("agency_id")
//每日新用户 //每日新用户
val device_id_newUser = sc.sql( val device_id_newUser = sc.sql(
...@@ -839,7 +839,7 @@ object find_reason { ...@@ -839,7 +839,7 @@ object find_reason {
|and blacklist.device_id is null |and blacklist.device_id is null
""".stripMargin """.stripMargin
) )
device_id_newUser.show() // device_id_newUser.show()
device_id_newUser.createOrReplaceTempView("device_id_new") device_id_newUser.createOrReplaceTempView("device_id_new")
//每日老用户 //每日老用户
...@@ -860,7 +860,7 @@ object find_reason { ...@@ -860,7 +860,7 @@ object find_reason {
|and blacklist.device_id is null |and blacklist.device_id is null
""".stripMargin """.stripMargin
) )
device_id_oldUser.show() // device_id_oldUser.show()
device_id_oldUser.createOrReplaceTempView("device_id_old") device_id_oldUser.createOrReplaceTempView("device_id_old")
...@@ -878,7 +878,7 @@ object find_reason { ...@@ -878,7 +878,7 @@ object find_reason {
|and agency_id.device_id is null |and agency_id.device_id is null
""".stripMargin """.stripMargin
) )
all_clk.show() // all_clk.show()
all_clk.createOrReplaceTempView("all_clk_diary_card") all_clk.createOrReplaceTempView("all_clk_diary_card")
//1.当天老用户中的点击用户数 //1.当天老用户中的点击用户数
...@@ -889,7 +889,7 @@ object find_reason { ...@@ -889,7 +889,7 @@ object find_reason {
|on oc.device_id = device_id_old.device_id |on oc.device_id = device_id_old.device_id
""".stripMargin """.stripMargin
) )
old_clk_count.show() // old_clk_count.show()
//1.1有点击的老用户 //1.1有点击的老用户
val old_clk_device = sc.sql( val old_clk_device = sc.sql(
s""" s"""
......
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