wngur6076 3 ヶ月 前
コミット
f2f12cd1c0

+ 2 - 2
function-in-db/procedures/dash_board/shop_dash/zds_door_sales_cancel_month.sql

@@ -52,7 +52,7 @@ FROM (
     SUM(sorder_qty) as sum_sorder_qty
     FROM dbr_sorder as mx
     INNER JOIN dbr_sorder_bd as mb ON mx.id = mb.sorder_id
-    WHERE true  and reward_date between '20240801' and '20240831' AND sorder_date >= previous_month_start_date and sorder_date <= previous_month_end_date
+       WHERE true and seller_id = 88  and sorder_date between '20240801' and '20240831' 
     GROUP BY seller_id, item_id
     ) as june_data ON mc.id = june_data.seller_id AND md.id = june_data.item_id
     LEFT JOIN (
@@ -62,7 +62,7 @@ FROM (
     SUM(CASE WHEN mx.status = 'C' THEN sorder_qty ELSE 0 END) AS sum_sorder_claim_qty
     FROM dbr_sorder as mx
     INNER JOIN dbr_sorder_bd as mb ON mx.id = mb.sorder_id
-    WHERE  true  and reward_date between '20240801' and '20240831' AND  sorder_date >= start_date and sorder_date <= end_date
+      WHERE true and seller_id = 88  and sorder_date between '20240801' and '20240831' 
     GROUP BY seller_id, item_id
     ) as july_data ON mc.id = july_data.seller_id AND md.id = july_data.item_id
     WHERE me.cgroup_code = 'A-0001'