Skip to content

Commit

Permalink
Update purchase_propensity_query_template.sqlx
Browse files Browse the repository at this point in the history
  • Loading branch information
chmstimoteo committed May 10, 2024
1 parent 9e1209b commit 45b9ff2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SELECT
a.prediction AS p_p_prediction,
NTILE(10) OVER (ORDER BY a.prediction_prob DESC) AS p_p_decile,
COALESCE(b.user_id, b.user_pseudo_id) AS client_id,
TIMESTAMP_ADD(b.event_timestamp, INTERVAL 1 MICROSECOND) AS inference_date
CASE WHEN EXTRACT(MICROSECOND FROM b.event_timestamp) = 1 THEN b.event_timestamp ELSE TIMESTAMP_SUB(b.event_timestamp, INTERVAL 1 MICROSECOND) END AS inference_date
FROM
`${mds_project_id}.marketing_ga4_v1_${mds_dataset_suffix}.latest_event_per_user_last_72_hours` b,
`{{source_table}}` a
Expand Down

0 comments on commit 45b9ff2

Please sign in to comment.