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

新统计需求

parent 8f4723c3
......@@ -262,7 +262,7 @@ object coincidence_xinyang {
//GmeiConfig.writeToJDBCTable(result, "coincidence_xinyang", SaveMode.Append)
//截止目前获得的与新氧重合的用户数计算美购情况
/* //截止目前获得的与新氧重合的用户数计算美购情况
val meigou_coincidence_num = sc.sql(
s"""
|select count(service_id) as meigou_coincidence_num
......@@ -286,6 +286,54 @@ object coincidence_xinyang {
""".stripMargin
)
meigou_pay_device.show()
*/
//截止目前获得的与新氧重合的用户数咨询统计
val zixun_num_all = sc.sql(
s"""
|select count(cl_id) as zixun_num_all
|from online.tl_hdfs_maidian_view
|where partition_date > '20171118'
|and action = 'welfare_detail_click_message'
""".stripMargin
)
zixun_num_all.show()
val zixun_device_all = sc.sql(
s"""
|select count(distinct(cl_id)) zixun_device_all
|from online.tl_hdfs_maidian_view
|where partition_date > '20171118'
|and action = 'welfare_detail_click_message'
""".stripMargin
)
zixun_device_all.show()
val zixun_num_co = sc.sql(
s"""
|select count(cl_id) as zixun_num_co
|from online.tl_hdfs_maidian_view
|where partition_date > '20171118'
|and action = 'welfare_detail_click_message'
|and cl_id in (select distinct(device_id) from device_id_coincidence)
""".stripMargin
)
zixun_num_co.show()
val zixun_num_co_dis = sc.sql(
s"""
|select count(distinct(cl_id)) as zixun_num_co_dis
|from online.tl_hdfs_maidian_view
|where partition_date > '20171118'
|and action = 'welfare_detail_click_message'
|and cl_id in (select distinct(device_id) from device_id_coincidence)
""".stripMargin
)
zixun_num_co_dis.show()
}
......
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