From c9e81d9958d304b5089881cdc30a4310d6a190fc Mon Sep 17 00:00:00 2001 From: Yam ZhengLim Date: Thu, 13 Jul 2023 15:26:52 +0000 Subject: [PATCH] Debug --- models/marts/reporting/rep_exchange__company_lists.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,