diff --git a/models/marts/reporting/rep_exchange__company_lists.sql b/models/marts/reporting/rep_exchange__company_lists.sql index af2131c..793ac3d 100644 --- a/models/marts/reporting/rep_exchange__company_lists.sql +++ b/models/marts/reporting/rep_exchange__company_lists.sql @@ -21,7 +21,7 @@ company_agg AS ( companies.company_marking_id, companies.company_created_datetime, COUNT(transaction_orders.transaction_order_id) AS count_order, - COUNT(IFF(transaction_orders.order_status = 'completed', transaction_orders.transaction_order_id, null)) AS count_completed_order, + COUNT(IFF(transaction_orders.order_status = 'COMPLETED', transaction_orders.transaction_order_id, null)) AS count_completed_order, MAX(transaction_orders.order_created_datetime) AS last_order_datetime, COALESCE(last_order_datetime, company_created_datetime) AS last_activity_datetime, IFF(companies.company_created_datetime < '2021-07-01', 1, 0) AS is_wrong_created_datetime_company,