diff --git a/models/marts/reporting/rep_exchange__daily_orders.sql b/models/marts/reporting/rep_exchange__daily_orders.sql index d7a5a8e..08640dc 100644 --- a/models/marts/reporting/rep_exchange__daily_orders.sql +++ b/models/marts/reporting/rep_exchange__daily_orders.sql @@ -212,7 +212,7 @@ fct_and_dim_joins AS ( WHEN service_type IN ('BA', 'RECEIVED-ON-BEHALF') THEN NULL WHEN transaction_status NOT IN ('UPLOADED_BANK_SLIP') THEN NULL WHEN order_created_datetime < '2023-01-01' THEN NULL - WHEN estimated_order_delivery_datetime_website_sla > orders.operation_uploaded_bank_slip_datetime THEN 1 + WHEN estimated_order_delivery_datetime_website_sla >= orders.operation_uploaded_bank_slip_datetime THEN 1 WHEN estimated_order_delivery_datetime_website_sla < orders.operation_uploaded_bank_slip_datetime THEN 0 ELSE -999 END AS is_on_time_delivery_website_sla, @@ -223,7 +223,7 @@ fct_and_dim_joins AS ( WHEN service_type IN ('BA', 'RECEIVED-ON-BEHALF') THEN NULL WHEN transaction_status NOT IN ('UPLOADED_BANK_SLIP') THEN NULL WHEN order_created_datetime < '2023-01-01' THEN NULL - WHEN estimated_order_delivery_datetime_customer_expectation > orders.operation_uploaded_bank_slip_datetime THEN 1 + WHEN estimated_order_delivery_datetime_customer_expectation >= orders.operation_uploaded_bank_slip_datetime THEN 1 WHEN estimated_order_delivery_datetime_customer_expectation < orders.operation_uploaded_bank_slip_datetime THEN 0 ELSE -999 END AS is_on_time_delivery_customer_expectation,