|
@@ -1337,7 +1337,7 @@
|
|
|
IFNULL(SUM(order_amount), 0) AS 'orderAmount',
|
|
|
IFNULL(SUM(CASE WHEN order_status != 80 THEN regimental_promotion_amount ELSE 0 END),0) AS
|
|
|
'regimentalPromotionAmount',
|
|
|
- IFNULL(sum(base_amount), 0) as 'baseAmount'
|
|
|
+ IFNULL(SUM(CASE WHEN order_status != 80 THEN order_amount ELSE 0 END),0) as 'baseAmount'
|
|
|
FROM kuaishou_supply_chain
|
|
|
WHERE stat_date >= #{startDate}
|
|
|
AND stat_date <= #{endDate}
|
|
@@ -1355,7 +1355,9 @@
|
|
|
COUNT(DISTINCT author_short_id) as 'promoterCount',
|
|
|
COUNT(order_id) as 'allNumber',
|
|
|
IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN 1 ELSE 0 END), 0) AS 'validOrderNUm',
|
|
|
- IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN total_pay_amount ELSE 0 END), 0) AS 'orderAmount',
|
|
|
+ IFNULL(SUM(total_pay_amount), 0) AS 'orderAmount',
|
|
|
+ IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN second_estimated_commission ELSE 0 END), 0) AS 'secondEstimatedCommission',
|
|
|
+ IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN total_pay_amount ELSE 0 END), 0) AS 'baseAmount',
|
|
|
IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9,0) AS
|
|
|
'regimentalPromotionAmount'
|
|
|
FROM bytedance_order_list
|