|
@@ -181,7 +181,7 @@
|
|
|
'validRadio',
|
|
|
sum( total_pay_amount )/100 AS 'payAmount',
|
|
|
sum( CASE WHEN flow_point != 'REFUND' THEN total_pay_amount ELSE 0 END )/100 AS 'validPayAmount',
|
|
|
- sum( CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END )/100 AS
|
|
|
+ sum( CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END )* 0.9 /100 AS
|
|
|
'regimentalPromotionAmount',
|
|
|
author_bind_user_id,
|
|
|
IFNULL(author_bind_user_name,'-') AS 'userName'
|
|
@@ -259,7 +259,7 @@
|
|
|
sum(total_pay_amount)/100 AS 'orderAmount',
|
|
|
IFNULL(round(SUM(CASE WHEN sample_voucher_status = 2 THEN total_pay_amount ELSE 0 END) / 100,2), 0) AS
|
|
|
'voucherOrderAmount',
|
|
|
- sum(colonel_estimated_commission)/100 AS 'regimentalPromotionAmount',
|
|
|
+ round( sum( CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END ) * 0.9 / 100, 2 ) AS 'regimentalPromotionAmount',
|
|
|
IFNULL(SUM(CASE WHEN sample_voucher_status = 2 THEN colonel_estimated_commission ELSE 0 END)/100, 0)
|
|
|
AS'voucherRegimentalPromotionAmount',
|
|
|
sum(colonel_real_commission)/100 AS 'totalRegimentalSettleAmount',
|
|
@@ -435,7 +435,7 @@
|
|
|
sum(case when t2.flow_point = 'REFUND' then 1 else 0 end) AS 'invalidOrderNUm',
|
|
|
sum(case when t2.flow_point != 'REFUND' then t2.total_pay_amount else 0 end)/100 AS 'payAmount',
|
|
|
sum(case when t2.flow_point != 'REFUND' then t2.colonel_estimated_commission
|
|
|
- else 0 end)/100 AS 'regimentalPromotionAmount',
|
|
|
+ else 0 end) *0.9 /100 AS 'regimentalPromotionAmount',
|
|
|
sum(case when t2.flow_point != 'REFUND' then t2.colonel_real_commission else 0 end)/100 as
|
|
|
'totalRegimentalSettleAmount'
|
|
|
FROM bytedance_promoter_order_list t2
|
|
@@ -474,7 +474,7 @@
|
|
|
sum(case when t2.flow_point = 'REFUND' then 1 else 0 end) AS 'invalidOrderNUm',
|
|
|
sum(case when t2.flow_point != 'REFUND' then t2.total_pay_amount else 0 end)/100 AS 'payAmount',
|
|
|
sum(case when t2.flow_point != 'REFUND' then t2.colonel_estimated_commission
|
|
|
- else 0 end)/100 AS 'regimentalPromotionAmount',
|
|
|
+ else 0 end) * 0.9 /100 AS 'regimentalPromotionAmount',
|
|
|
sum(case when t2.flow_point != 'REFUND' then t2.colonel_real_commission else 0 end)/100 as
|
|
|
'totalRegimentalSettleAmount'
|
|
|
FROM kuaishou_item_list t1
|
|
@@ -661,7 +661,7 @@
|
|
|
AS 'validRadio',
|
|
|
sum( CASE WHEN t2.flow_point = 'REFUND' THEN 1 ELSE 0 END ) AS 'invalidOrderNUm',
|
|
|
sum( CASE WHEN t2.flow_point != 'REFUND' THEN t2.total_pay_amount ELSE 0 END ) AS 'payAmount',
|
|
|
- sum( CASE WHEN t2.flow_point != 'REFUND' THEN t2.colonel_estimated_commission ELSE 0 END ) AS
|
|
|
+ sum( CASE WHEN t2.flow_point != 'REFUND' THEN t2.colonel_estimated_commission ELSE 0 END ) * 0.9 AS
|
|
|
'regimentalPromotionAmount',
|
|
|
sum( CASE WHEN t2.flow_point != 'REFUND' THEN t2.colonel_real_commission ELSE 0 END ) AS
|
|
|
'totalRegimentalSettleAmount'
|
|
@@ -695,7 +695,7 @@
|
|
|
sum( CASE WHEN flow_point = 'REFUND' THEN 1 ELSE 0 END ) AS 'invalidOrderNUm',
|
|
|
round( sum( CASE WHEN flow_point != 'REFUND' THEN total_pay_amount ELSE 0 END )/ 100, 2 ) AS 'payAmount',
|
|
|
CONCAT(round(colonel_commission_rate/100,2),'%') AS 'regimentalPromotionRate',
|
|
|
- round( sum( CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END ) / 100, 2 ) AS
|
|
|
+ round( sum( CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END ) * 0.9 / 100, 2 ) AS
|
|
|
'regimentalPromotionAmount',
|
|
|
round( sum( CASE WHEN flow_point != 'REFUND' THEN colonel_real_commission ELSE 0 END ) / 100, 2 ) AS
|
|
|
'totalRegimentalSettleAmount',
|
|
@@ -779,7 +779,7 @@
|
|
|
sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) AS 'validOrderNum',
|
|
|
concat(round(sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) / count(t2.order_id) * 100, 2), '%') as 'validOrderRate',
|
|
|
round(sum(t2.total_pay_amount) / 100, 2) as 'orderAmount',
|
|
|
- round(sum(t2.colonel_estimated_commission) / 100, 2) as 'regimentalPromotionAmount',
|
|
|
+ round( sum( CASE WHEN t2.flow_point != 'REFUND' THEN t2.colonel_estimated_commission ELSE 0 END ) * 0.9 / 100, 2 ) as 'regimentalPromotionAmount',
|
|
|
round(sum(t2.colonel_real_commission) / 100, 2) as 'totalRegimentalSettleAmount'
|
|
|
from promoter_bind_channel_date t1
|
|
|
left join bytedance_promoter_order_list t2
|
|
@@ -842,7 +842,7 @@
|
|
|
sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) as 'validOrderNum',
|
|
|
concat(round(sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) / count(t2.order_id) * 100, 2), '%') as 'validOrderRate',
|
|
|
round(sum(t2.total_pay_amount) / 100, 2) as 'orderAmount',
|
|
|
- round(sum(t2.colonel_estimated_commission) / 100, 2) as 'regimentalPromotionAmount',
|
|
|
+ round( sum( CASE WHEN t2.flow_point != 'REFUND' THEN t2.colonel_estimated_commission ELSE 0 END ) * 0.9 / 100, 2 ) as 'regimentalPromotionAmount',
|
|
|
round(sum(t2.colonel_real_commission) / 100, 2) as 'totalRegimentalSettleAmount'
|
|
|
from kuaishou_promoter t1
|
|
|
left join(select *
|