|
@@ -2748,15 +2748,17 @@
|
|
|
t1.user_name as 'collectSampleName',
|
|
|
count(t2.oid) as 'orderNum',
|
|
|
sum(case when t2.order_status != 80 then 1 else 0 end) as 'validOrderNum',
|
|
|
- concat(round(sum(case when t2.order_status != 80 then 1 else 0 end) / count(t2.oid) * 100, 2), '%') as 'validOrderRate',
|
|
|
+ concat(round(sum(case when t2.order_status != 80 then 1 else 0 end) / count(t2.oid) * 100, 2), '%') as
|
|
|
+ 'validOrderRate',
|
|
|
round(sum(t2.order_amount) / 100, 2) as 'orderAmount',
|
|
|
+ round(
|
|
|
sum(
|
|
|
CASE
|
|
|
WHEN t2.order_status != 80 THEN t2.regimental_promotion_amount
|
|
|
ELSE 0
|
|
|
END
|
|
|
- ) AS 'regimentalPromotionAmount',
|
|
|
- sum(case when t2.order_status != 80 then t2.total_regimental_settle_amount else 0 end) as
|
|
|
+ ) / 100 , 2) AS 'regimentalPromotionAmount',
|
|
|
+ round(sum(case when t2.order_status != 80 then t2.total_regimental_settle_amount else 0 end) / 100 , 2) as
|
|
|
'totalRegimentalSettleAmount'
|
|
|
from promoter_bind_channel_date t1
|
|
|
left join kuaishou_supply_chain t2
|
|
@@ -2785,15 +2787,16 @@
|
|
|
t1.promoter_url as 'promoterUrl',
|
|
|
count(t2.oid) as 'orderNum',
|
|
|
sum(case when t2.order_status != 80 then 1 else 0 end) as 'validOrderNum',
|
|
|
- concat(round(sum(case when t2.order_status != 80 then 1 else 0 end) / count(t2.oid) * 100, 2), '%') as 'validOrderRate',
|
|
|
+ concat(round(sum(case when t2.order_status != 80 then 1 else 0 end) / count(t2.oid) * 100, 2), '%') as
|
|
|
+ 'validOrderRate',
|
|
|
round(sum(t2.order_amount) / 100, 2) as 'orderAmount',
|
|
|
- sum(
|
|
|
+ round( sum(
|
|
|
CASE
|
|
|
WHEN t2.order_status != 80 THEN t2.regimental_promotion_amount
|
|
|
ELSE 0
|
|
|
END
|
|
|
- ) AS 'regimentalPromotionAmount',
|
|
|
- sum(case when t2.order_status != 80 then t2.total_regimental_settle_amount else 0 end) as
|
|
|
+ ) / 100 , 2) AS 'regimentalPromotionAmount',
|
|
|
+ round(sum(case when t2.order_status != 80 then t2.total_regimental_settle_amount else 0 end) / 100 , 2)as
|
|
|
'totalRegimentalSettleAmount'
|
|
|
from promoter_bind_channel_date t1
|
|
|
left join kuaishou_supply_chain t2
|