Commit 9cc2c4b1 authored by 王志伟's avatar 王志伟

统计复购用户日记本

parent bdc24b0a
......@@ -794,11 +794,13 @@ object bug_again_count {
val meigou_id_order = sc.sql(
s"""
|select a.user_id from (select user_id,count(order_id) as order_num
|from online.ml_meigou_order_detail
|where status="2"
|and partition_date='${partition_date}'
|group by user_id
|select a.user_id from (select od.user_id,count(od.order_id) as order_num
|from online.ml_meigou_order_detail od left join spam_order_id
|on od.order_id=spam_order_id.order_id
|where od.status="2"
|and od.partition_date='${partition_date}'
|and spam_order_id.order_id is null
|group by od.user_id
|order by order_num) a
|where a.order_num>=2
""".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