From fb3aac899a48a8b75f7741fd0638584475c907cd Mon Sep 17 00:00:00 2001 From: Carlos Timoteo Date: Wed, 4 Dec 2024 12:43:18 -0500 Subject: [PATCH] Update invoke_churn_propensity_training_preparation.sqlx --- sql/query/invoke_churn_propensity_training_preparation.sqlx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/query/invoke_churn_propensity_training_preparation.sqlx b/sql/query/invoke_churn_propensity_training_preparation.sqlx index 1c57ebb..10a48ef 100644 --- a/sql/query/invoke_churn_propensity_training_preparation.sqlx +++ b/sql/query/invoke_churn_propensity_training_preparation.sqlx @@ -63,8 +63,8 @@ IF churners > 0 THEN SET train_start_date = min_date; SET train_end_date = max_date; ELSE - SET train_start_date = DATE '2000-01-01'; - SET train_end_date = DATE '2024-12-01'; + SET train_start_date = DATE_SUB(CURRENT_DATE(), INTERVAL 3 YEAR); + SET train_end_date = DATE_SUB(CURRENT_DATE(), INTERVAL 5 DAY); END IF; -- Finally, the script calls a stored procedure, passing the adjusted training dates and split numbers as arguments.