Commit fb4acfb6 by chenyuanjie

年度流量选品-只展示最新月出现的asin的月销

parent f853f1af
...@@ -1197,7 +1197,8 @@ SELECT ...@@ -1197,7 +1197,8 @@ SELECT
f.one_star, f.two_star, f.three_star, f.four_star, f.five_star, f.low_star, f.one_star, f.two_star, f.three_star, f.four_star, f.five_star, f.low_star,
f.bsr_orders, f.bsr_orders,
f.bsr_orders_sale, f.bsr_orders_sale,
f.asin_bought_month, -- asin本月快照没跟上最新月(latest_date_info != 本次跑批月份)时,月销/环比/同比置空
CASE WHEN DATE_FORMAT(f.date_info, '%Y-%m') = '{latest_date_info}' THEN f.asin_bought_month ELSE NULL END AS asin_bought_month,
f.ao_val, f.ao_val,
f.zr_counts, f.zr_counts,
f.sp_counts, f.sb_counts, f.vi_counts, f.bs_counts, f.sp_counts, f.sb_counts, f.vi_counts, f.bs_counts,
...@@ -1258,7 +1259,8 @@ SELECT ...@@ -1258,7 +1259,8 @@ SELECT
f.bsr_orders_rise, f.bsr_orders_mom AS bsr_orders_change, f.bsr_orders_yoy, f.bsr_orders_rise, f.bsr_orders_mom AS bsr_orders_change, f.bsr_orders_yoy,
f.sales_rise, f.sales_mom AS sales_change, f.sales_yoy, f.sales_rise, f.sales_mom AS sales_change, f.sales_yoy,
f.variation_rise, f.variation_mom AS variation_change, f.variation_yoy, f.variation_rise, f.variation_mom AS variation_change, f.variation_yoy,
f.bought_month_mom, f.bought_month_yoy, CASE WHEN DATE_FORMAT(f.date_info, '%Y-%m') = '{latest_date_info}' THEN f.bought_month_mom ELSE NULL END AS bought_month_mom,
CASE WHEN DATE_FORMAT(f.date_info, '%Y-%m') = '{latest_date_info}' THEN f.bought_month_yoy ELSE NULL END AS bought_month_yoy,
pr.ocean_profit, pr.air_profit, pr.ocean_profit, pr.air_profit,
FROM_UNIXTIME((CAST(kp.tracking_since AS BIGINT) + 21564000) * 60) AS tracking_since, FROM_UNIXTIME((CAST(kp.tracking_since AS BIGINT) + 21564000) * 60) AS tracking_since,
CASE CASE
......
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