Max EDD with disbursement schedule
Post date: Nov 14, 2013 12:25:11 AM
We can have the disbursement schedule from this table: D_MERCH_ACCT_DISBURSEMENT_TFX
Here is how we can get the Max EDD:
select order_id, customer_id, ship_day, shipping_address, clock_stop_event_datetime,actual_delivery_datetime,promised_delivery_datetime
from D_CUST_SHIPMENT_ITEM_PKGS
where region_id = 1
and marketplace_id = 1
and ship_day >= to_date('09Mar2013','ddmonyyyy')
and ship_day < to_date('13Mar2013','ddmonyyyy')
and merchant_customer_id = 385199957;
The Max EDD is corresponding to promised_delivery_datetime in the table D_CUST_SHIPMENT_ITEM_PKGS.
In fact, I try to use this relation to catch BSCT whose details can be found in this page.