Skip to content

Commit

Permalink
fixing unnecessary features for LTV
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Timoteo committed Nov 2, 2023
1 parent 80b59f9 commit 1dbbc8e
Showing 1 changed file with 3 additions and 39 deletions.
42 changes: 3 additions & 39 deletions sql/procedure/customer_lifetime_value_inference_preparation.sqlx
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ CREATE OR REPLACE TEMP TABLE inference_preparation_uwm as (
MAX(UWM.checkouts_past_90_120_day) OVER(user_lifetime_rolling_window) AS checkouts_past_90_120_day,
MAX(UWM.checkouts_past_120_150_day) OVER(user_lifetime_rolling_window) AS checkouts_past_120_150_day,
MAX(UWM.checkouts_past_150_180_day) OVER(user_lifetime_rolling_window) AS checkouts_past_150_180_day,
MAX(UWM.ltv_revenue_past_1_30_day) OVER(user_lifetime_rolling_window) AS ltv_revenue_past_1_30_day,
MAX(UWM.ltv_revenue_past_30_90_day) OVER(user_lifetime_rolling_window) AS ltv_revenue_past_30_90_day,
MAX(UWM.ltv_revenue_past_90_180_day) OVER(user_lifetime_rolling_window) AS ltv_revenue_past_90_180_day
--MAX(UWM.ltv_revenue_past_1_30_day) OVER(user_lifetime_rolling_window) AS ltv_revenue_past_1_30_day,
--MAX(UWM.ltv_revenue_past_30_90_day) OVER(user_lifetime_rolling_window) AS ltv_revenue_past_30_90_day,
--MAX(UWM.ltv_revenue_past_90_180_day) OVER(user_lifetime_rolling_window) AS ltv_revenue_past_90_180_day
FROM
`{{feature_store_project_id}}.{{feature_store_dataset}}.user_rolling_window_lifetime_metrics` UWM
WHERE
Expand Down Expand Up @@ -219,9 +219,6 @@ CREATE OR REPLACE TEMP TABLE inference_preparation as (
UWM.checkouts_past_90_120_day,
UWM.checkouts_past_120_150_day,
UWM.checkouts_past_150_180_day,
UWM.ltv_revenue_past_1_30_day,
UWM.ltv_revenue_past_30_90_day,
UWM.ltv_revenue_past_90_180_day,
UM.lifetime_purchasers_users,
UM.lifetime_average_daily_purchasers,
UM.lifetime_active_users,
Expand Down Expand Up @@ -327,9 +324,6 @@ INSERT INTO `{{project_id}}.{{dataset}}.{{insert_table}}`
checkouts_past_90_120_day,
checkouts_past_120_150_day,
checkouts_past_150_180_day,
ltv_revenue_past_1_30_day,
ltv_revenue_past_30_90_day,
ltv_revenue_past_90_180_day,
lifetime_purchasers_users,
lifetime_average_daily_purchasers,
lifetime_active_users,
Expand Down Expand Up @@ -420,9 +414,6 @@ feature_date,
checkouts_past_90_120_day,
checkouts_past_120_150_day,
checkouts_past_150_180_day,
ltv_revenue_past_1_30_day,
ltv_revenue_past_30_90_day,
ltv_revenue_past_90_180_day,
lifetime_purchasers_users,
lifetime_average_daily_purchasers,
lifetime_active_users,
Expand Down Expand Up @@ -517,9 +508,6 @@ CREATE OR REPLACE TABLE `{{project_id}}.{{dataset}}.customer_lifetime_value_infe
checkouts_past_90_120_day,
checkouts_past_120_150_day,
checkouts_past_150_180_day,
ltv_revenue_past_1_30_day,
ltv_revenue_past_30_90_day,
ltv_revenue_past_90_180_day,
lifetime_purchasers_users,
lifetime_average_daily_purchasers,
lifetime_active_users,
Expand Down Expand Up @@ -614,9 +602,6 @@ CREATE OR REPLACE TABLE `{{project_id}}.{{dataset}}.customer_lifetime_value_infe
checkouts_past_90_120_day,
checkouts_past_120_150_day,
checkouts_past_150_180_day,
ltv_revenue_past_1_30_day,
ltv_revenue_past_30_90_day,
ltv_revenue_past_90_180_day,
lifetime_purchasers_users,
lifetime_average_daily_purchasers,
lifetime_active_users,
Expand Down Expand Up @@ -711,9 +696,6 @@ CREATE OR REPLACE TABLE `{{project_id}}.{{dataset}}.customer_lifetime_value_infe
checkouts_past_90_120_day,
checkouts_past_120_150_day,
checkouts_past_150_180_day,
ltv_revenue_past_1_30_day,
ltv_revenue_past_30_90_day,
ltv_revenue_past_90_180_day,
lifetime_purchasers_users,
lifetime_average_daily_purchasers,
lifetime_active_users,
Expand Down Expand Up @@ -808,9 +790,6 @@ CREATE OR REPLACE VIEW `{{project_id}}.{{dataset}}.v_customer_lifetime_value_inf
checkouts_past_90_120_day,
checkouts_past_120_150_day,
checkouts_past_150_180_day,
ltv_revenue_past_1_30_day,
ltv_revenue_past_30_90_day,
ltv_revenue_past_90_180_day,
lifetime_purchasers_users,
lifetime_average_daily_purchasers,
lifetime_active_users,
Expand Down Expand Up @@ -907,9 +886,6 @@ SELECT DISTINCT
checkouts_past_90_120_day,
checkouts_past_120_150_day,
checkouts_past_150_180_day,
ltv_revenue_past_1_30_day,
ltv_revenue_past_30_90_day,
ltv_revenue_past_90_180_day,
lifetime_purchasers_users,
lifetime_average_daily_purchasers,
lifetime_active_users,
Expand Down Expand Up @@ -1005,9 +981,6 @@ CREATE OR REPLACE VIEW `{{project_id}}.{{dataset}}.v_customer_lifetime_value_inf
checkouts_past_90_120_day,
checkouts_past_120_150_day,
checkouts_past_150_180_day,
ltv_revenue_past_1_30_day,
ltv_revenue_past_30_90_day,
ltv_revenue_past_90_180_day,
lifetime_purchasers_users,
lifetime_average_daily_purchasers,
lifetime_active_users,
Expand Down Expand Up @@ -1104,9 +1077,6 @@ SELECT DISTINCT
checkouts_past_90_120_day,
checkouts_past_120_150_day,
checkouts_past_150_180_day,
ltv_revenue_past_1_30_day,
ltv_revenue_past_30_90_day,
ltv_revenue_past_90_180_day,
lifetime_purchasers_users,
lifetime_average_daily_purchasers,
lifetime_active_users,
Expand Down Expand Up @@ -1200,9 +1170,6 @@ SELECT DISTINCT
checkouts_past_90_120_day,
checkouts_past_120_150_day,
checkouts_past_150_180_day,
ltv_revenue_past_1_30_day,
ltv_revenue_past_30_90_day,
ltv_revenue_past_90_180_day,
lifetime_purchasers_users,
lifetime_average_daily_purchasers,
lifetime_active_users,
Expand Down Expand Up @@ -1299,9 +1266,6 @@ SELECT DISTINCT
checkouts_past_90_120_day,
checkouts_past_120_150_day,
checkouts_past_150_180_day,
ltv_revenue_past_1_30_day,
ltv_revenue_past_30_90_day,
ltv_revenue_past_90_180_day,
lifetime_purchasers_users,
lifetime_average_daily_purchasers,
lifetime_active_users,
Expand Down

0 comments on commit 1dbbc8e

Please sign in to comment.