运营利润报表,三月份,配送费,月度仓储费金额错误
[步骤]
[结果]
[期望]
问题1:三月份,配送费比订单利润报表多三百万美金


问题2:月度仓储费金额为0
select sum(estimated_monthly_storage_fee) from fact_amz_storage_fee t where t.grab_date >= to_date('20220401','YYYYMMDD HH24:MI:SS') and t.grab_date <= to_date('20220430 23:59:59','YYYYMMDD HH24:MI:SS') and t.order_source_dwid = '1693' and t.asin = 'B09BB69J12';---月度仓储费



配送费:
1. 结算明细存在重复记录,导致结算明细的订单费用翻倍
2. 结算明细同个平台订单的 erp_order_code 字段会变动,导致有时关联结算明细能取到费用,有时不能。
月度仓储费的分摊的时间不对 费用表和明细表都是20220415,基础报表变成20220428,挂到了不是同一天的订单上
select * from sh_logic.fact_share_fee_operation_formal where fee_type_code = 400001 and report_day >= 20220401 and report_day <= 20220430 and source_dwid = 1693 and msku = 'GEM147117LKHWD';
select * from sh_logic.fact_share_fee_detail_operation_formal where fee_type_code = 400001 and report_day >= 20220401 and report_day <= 20220430 and source_dwid = 1693 and msku = 'GEM147117LKHWD';
select * from sh_logic.fact_share_base_report_operation where report_day >= 20220401 and report_day <= 20220430 and storage_fee_month != 0 and source_dwid = 1693 and msku = 'GEM147117LKHWD';