diff --git a/module/oc_telegram_shop/upload/oc_telegram_shop/src/Handlers/ETLHandler.php b/module/oc_telegram_shop/upload/oc_telegram_shop/src/Handlers/ETLHandler.php index 0461559..17ec542 100755 --- a/module/oc_telegram_shop/upload/oc_telegram_shop/src/Handlers/ETLHandler.php +++ b/module/oc_telegram_shop/upload/oc_telegram_shop/src/Handlers/ETLHandler.php @@ -105,10 +105,18 @@ class ETLHandler 'orders_count' => 'orders_count_total', 'created_at' => 'registered_at', new RawExpression( - '(SELECT MIN(date_added) FROM oc_order WHERE oc_order.customer_id = telecart_customers.oc_customer_id) AS first_order_date' + '( + SELECT MIN(date_added) + FROM oc_order + WHERE oc_order.customer_id = telecart_customers.oc_customer_id + ) AS first_order_date' ), new RawExpression( - '(SELECT MAX(date_added) FROM oc_order WHERE oc_order.customer_id = telecart_customers.oc_customer_id) AS last_order_date' + '( + SELECT MAX(date_added) + FROM oc_order + WHERE oc_order.customer_id = telecart_customers.oc_customer_id + ) AS last_order_date' ), new RawExpression( "COALESCE((